Dynamically adjusting a sample-to-pixel filter to compensate for the effects of negative lobes

ABSTRACT

A graphics system comprises a graphics processor, a sample buffer, and a sample-to-pixel calculation unit. The graphics processor generates samples in response to received stream of graphics data. The sample buffer may be configured to store the samples. The sample-to-pixel calculation unit is programmable to generate a plurality of output pixels by filtering the rendered samples using a filter. A filter having negative lobes may be used. The graphics system computes a negativity value for a first frame. The negativity value measures an amount of pixel negativity in the first frame. In response to the negativity value being above a certain threshold, the graphics systems adjusts the filter function and/or filter support in order to reduce the negativity value for subsequent frames.

PRIORITY CLAIM

This application claims the benefit of U.S. Provisional Application No.60/175,384, filed on Jan. 11, 2000, and titled “Photorealistic HardwareAntialiasing”.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates generally to the field of computer graphics and,more particularly, to high performance graphics systems.

2. Description of the Related Art

A computer system typically relies upon its graphics system forproducing visual output on the computer screen or display device. Earlygraphics systems were only responsible for taking what the processorproduced as output and displaying that output on the screen. In essence,they acted as simple translators or interfaces. Modern graphics systems,however, incorporate graphics processors with a great deal of processingpower. They now act more like coprocessors rather than simpletranslators. This change is due to the recent increase in both thecomplexity and amount of data being sent to the display device. Forexample, modern computer displays have many more pixels, greater colordepth, and are able to display images that are more complex with higherrefresh rates than earlier models. Similarly, the images displayed arenow more complex and may involve advanced techniques such asanti-aliasing and texture mapping.

As a result, without considerable processing power in the graphicssystem, the CPU would spend a great deal of time performing graphicscalculations. This could rob the computer system of the processing powerneeded for performing other tasks associated with program execution andthereby dramatically reduce overall system performance. With a powerfulgraphics system, however, when the CPU is instructed to draw a box onthe screen, the CPU is freed from having to compute the position andcolor of each pixel. Instead, the CPU may send a request to the videocard stating: “draw a box at these coordinates”. The graphics systemthen draws the box, freeing the processor to perform other tasks.

Generally, a graphics system in a computer (also referred to as agraphics system) is a type of video adapter that contains its ownprocessor to boost performance levels. These processors are specializedfor computing graphical transformations, so they tend to achieve betterresults than the general-purpose CPU used by the computer system. Inaddition, they free up the computer's CPU to execute other commandswhile the graphics system is handling graphics computations. Thepopularity of graphical applications, and especially multimediaapplications, has made high performance graphics systems a commonfeature of computer systems. Most computer manufacturers now bundle ahigh performance graphics system with their systems.

Since graphics systems typically perform only a limited set offunctions, they may be customized and therefore far more efficient atgraphics operations than the computer's general-purpose centralprocessor. While early graphics systems were limited to performingtwo-dimensional (2D) graphics, their functionality has increased tosupport three-dimensional (3D) wire-frame graphics, 3D solids, and nowincludes support for three-dimensional (3D) graphics with textures andspecial effects such as advanced shading, fogging, alpha-blending, andspecular highlighting.

The processing power of 3D graphics systems has been improving at abreakneck pace. A few years ago, shaded images of simple objects couldonly be rendered at a few frames per second, while today's systemssupport rendering of complex objects at 60 Hz or higher. At this rate ofincrease, in the not too distant future, graphics systems will literallybe able to render more pixels than a single human's visual system canperceive.

While the number of pixels is an important factor in determininggraphics system performance, another factor of equal import is thequality of the image. For example, an image with a high pixel densitymay still appear unrealistic if edges within the image are too sharp orjagged (also referred to as “aliased”). One well-known technique toovercome these problems is anti-aliasing. Anti-aliasing involvessmoothing the edges of objects by shading pixels along the borders ofgraphical elements. More specifically, anti-aliasing entails removinghigher size components from an image before they cause disturbing visualartifacts. For example, anti-aliasing may soften or smooth high contrastedges in an image by forcing certain pixels to intermediate values(e.g., around the silhouette of a bright object superimposed against adark background).

Another visual effect used to increase the realism of computer images isalpha blending. Alpha blending is a technique that controls thetransparency of an object, allowing realistic rendering of translucentsurfaces such as water or glass. Another technique used to improverealism is fogging. Fogging obscures an object as it moves away from theviewer. Simple fogging is a special case of alpha blending in which thedegree of alpha changes with distance so that the object appears tovanish into a haze as the object moves away from the viewer. This simplefogging may also be referred to as “depth cueing” or atmosphericattenuation, i.e., lowering the contrast of an object so that it appearsless prominent as it recedes. Types of fogging that are more complex gobeyond a simple linear function to provide relationships that are morecomplex between the level of translucence and an object's distance fromthe viewer. Current state of the art software systems go even further byutilizing atmospheric models to provide low-lying fog with improvedrealism.

While the techniques listed above may dramatically improve theappearance of computer graphics images, they also have certainlimitations. In particular, they may introduce their own aberrations andare typically limited by the density of pixels displayed on the displaydevice.

As a result, a graphics system is desired which is capable of utilizingincreased performance levels to increase not only the number of pixelsrendered but also the quality of the image rendered. In addition, agraphics system is desired which is capable of utilizing increases inprocessing power to improve graphics effects such as anti-aliasing.

Prior art graphics systems have generally fallen short of these goals.Prior art graphics systems use a conventional frame buffer forrefreshing pixel/video data on the display. The frame buffer stores rowsand columns of pixels that exactly correspond to respective row andcolumn locations on the display. Prior art graphics system render 2Dand/or 3D images or objects into the frame buffer in pixel form, andthen read the pixels from the frame buffer during a screen refresh torefresh the display. Thus, the frame buffer stores the output pixelsthat are provided to the display. To reduce visual artifacts that may becreated by refreshing the screen at the same time as the frame buffer isbeing updated, most graphics systems' frame buffers are double-buffered.

To obtain images that are more realistic, some prior art graphicssystems have gone further by generating more than one sample per pixel.As used herein, the term “sample” refers to calculated color informationthat indicates the color, depth (z), transparency, and potentially otherinformation, of a particular point on an object or image. For example, asample may comprise the following component values: a red value, a greenvalue, a blue value, a z value, and an alpha value (e.g., representingthe transparency of the sample). A sample may also comprise otherinformation, e.g., a z-depth value, a blur value, an intensity value,brighter-than-bright information, and an indicator that the sampleconsists partially or completely of control information rather thancolor information (i.e., “sample control information”). By calculatingmore samples than pixels (i.e., super-sampling), a more detailed imageis calculated than can be displayed on the display device. For example,a graphics system may calculate four samples for each pixel to be outputto the display device. After the samples are calculated, they are thencombined or filtered to form the pixels that are stored in the framebuffer and then conveyed to the display device. Using pixels formed inthis manner may create a more realistic final image because overlyabrupt changes in the image may be smoothed by the filtering process.

These prior art super-sampling systems typically generate a number ofsamples that are far greater than the number of pixel locations on thedisplay. These prior art systems typically have rendering processorsthat calculate the samples and store them into a render buffer.Filtering hardware then reads the samples from the render buffer,filters the samples to create pixels, and then stores the pixels in atraditional frame buffer. The traditional frame buffer is typicallydouble-buffered, with one side being used for refreshing the displaydevice while the other side is updated by the filtering hardware. Oncethe samples have been filtered, the resulting pixels are stored in atraditional frame buffer that is used to refresh the display device.These systems, however, have generally suffered from limitations imposedby the conventional frame buffer and by the added latency caused by therender buffer and filtering. Therefore, an improved graphics system isdesired which includes the benefits of pixel super-sampling whileavoiding the drawbacks of the conventional frame buffer.

A graphics system configured to overcome these drawbacks was proposed inU.S. patent application Ser. No. 09/251,840 titled “A GRAPHICS SYSTEMWITH A VARIABLE-RESOLUTION SAMPLE BUFFER” which is incorporated hereinby reference in its entirety.

Although the effects of filtering yield images that are typicallypleasing to the eye, filtering may also generate undesirable artifacts.In some situations, a filter having negative weights as well as positiveweights may be used. For example, filters such as the windowed Sincfilter, the Mitchell-Netravali filter, etc. have negative lobes as wellas one or more positive lobes. A negative lobe is a portion of thefilter where the filter function attains negative values. A positivelobe is a portion of the filter where the filter function attainspositive values.

Low-pass filters may be used to remove high spatial frequencies in asampled image. The ideal low-pass filter corresponds to an infinite Sincfunction in the X-Y domain, and a cylinder in the spatial frequencydomain. The spatial width (e.g. the width of the main positive lobe) ofthe Sinc function primarily determines the cutoff spatial frequency ofthe low-pass filter. Many low-pass filters have negative lobes in anattempt to emulate some of the structure of the Sinc function over afinite support. Of course, all realizable filters have finite support(i.e. extent in the X-Y domain).

As a result of using filters with negative lobes and finite support,pixels with negative intensity values may be generated. Negativeintensity values cannot be realized on a display device. A typicalsolution to these negative intensity values in prior art systems is toclip these values to zero, which means representing the pixel as black.As a result of this clipping, undesirable artifacts may become apparent,such as ringing or fringing (i.e. either light or dark bands echoing theedges of large transitions in intensities). Thus, a graphics system isdesired that retains the benefits of real-time filtering of sampleswhile reducing or eliminating the undesirable effects of negative lobes.

In addition to negative lobes, another impediment to realistic images isthe variable nature of current display devices. Different displays(e.g., differing by display technology, age, or manufacturer) havedifferent characteristics. For example, a CRT may have pixels that havemore of a Gaussian intensity spread around the pixel. On the other hand,LCDs may have more of a square intensity distribution in their pixels.Furthermore, this situation is further complicated by different usershaving different preferences for the visual appearance of displayedimages. For example, what might appear as an acceptably sharp image toone user may appear to another user as excessively smoothed. Thus, agraphics system is desired that can dynamically adjust the filter type,filter function and/or the filter support in response to user input. Inaddition, a graphics system is desired with the ability to detect theoutput of the display device and dynamically adjust the filter inresponse thereto.

SUMMARY OF THE INVENTION

A computer graphics system that utilizes a graphics processor, a samplebuffer and one or more sample-to-pixel calculation units for refreshinga display is contemplated. The graphics processor generates a pluralityof samples in response to an input stream of 3D graphics data, andstores the samples into the sample buffer. The graphics processorpreferably generates and stores more than one sample for at least asubset of the pixel locations on the display. Thus, the sample buffermay be a super-sampled sample buffer which stores a number of samplesthat, in some embodiments, may be far greater than the number of pixellocations on the display. In other embodiments, the total number ofsamples may be closer to, equal to, or even less than the total numberof pixel locations on the display device, but the samples may be moredensely positioned in certain areas and less densely positioned in otherareas.

The sample-to-pixel calculation units are configured to read the samplesfrom the super-sampled sample buffer and filter or convolve the samplesto generate output pixels. The output pixels are then provided torefresh the display. Note that, as used herein, the term “filter” refersto mathematically manipulating one or more samples to generate a pixel(e.g., by averaging, convolving, summing, applying a filtering function,weighting the samples and then manipulating them, applying a randomizedfunction, etc.). The sample-to-pixel calculation units select one ormore samples and filters them to generate an output pixel. Note that thenumber of samples selected and/or filtered by the a givensample-to-pixel calculation unit may be one or, as in the preferredembodiment, greater than one.

In some embodiments, the graphics system may operate without aconventional frame buffer. In other words, the output pixel streamgenerated by the sample-to-pixel calculation units may be supplied tothe display device without an intervening frame buffer. Note that somedisplays may have internal frame buffers, but these are considered anintegral part of the display device, not the graphics system. Thus, thesample-to-pixel calculation units may calculate each pixel for eachscreen refresh on a real-time basis. As used herein, the term“real-time” refers to a function that is performed at or near thedisplay device's refresh rate. “On-the-fly” means at, near, or above thehuman visual system's perception capabilities for motion fusion (howoften a picture must be changed to give the illusion of continuousmotion) and/or flicker fusion (how often light intensity must be changedto give the illusion of continuous illumination). These concepts arefurther described in the book “Spatial Vision” by Russel L. De Valoisand Karen K. De Valois, Oxford University Press, 1988.

In some embodiments, the graphics system may be operable to dynamicallyadjust the filter used for generating the output pixels in response to asubset of the output pixels having negative values. Pixels with negativevalues may be generated, for example, as a result of using a filter withnegative lobes. The graphics system may include a negativity computationunit configured to receive the output pixels from the sample-to-pixelcalculation units, and to compute a frame negativity value based on thenegative pixels (or a subset of the negative pixels) in a frame. Thenegativity computation unit may compute the frame negativity value inparallel with the generation of the output pixels.

In one set of embodiments, the negativity computation unit firstgenerates a histogram of the negative pixel values. A conventionalhistogram may be used or a histogram having binary cell widths may beused. The frame negativity value may be computed by forming a weightedaverage of all the cell sizes in the histogram. Cell sizes correspondingto cells of low negativity may be weighted less than cell sizescorresponding to cells of high negativity. The frame negativity valuemay be compared against a predetermined negativity threshold. Note thatthe frame negativity value, as referred to herein, is a positive number.The current filter may remain in force if the frame negativity value isless than the threshold. When the frame negativity value is above thethreshold value, the graphics system may dynamically adjust the filterin order to reduce the negativity value for subsequent frames.

In one embodiment, the sample-to-pixel calculation units may apply theadjusted filter to the filtration of samples starting with the nextframe. In other embodiments, the sample-to-pixel calculation units mayapply the adjusted filter to the filtration of samples starting with theframe after next frame, or more generally, with the N^(th) subsequentframe. In some embodiments, the graphics system may employ a level ofhysteresis to prevent flickering.

The graphics system may continue to monitor the frame negativity valueand continues to re-adjust the filter. In one embodiment, the graphicssystem may modify the filter coefficients in response to the framenegativity value continuing to increase,

In some embodiments, the filter may be dynamically adjusted in responseto receiving user input. Different users may have different preferencesas to the quality of an image. Certain users may prefer, for example, animage that is sharper, whereas other users may prefer an image that isless sharp and softer. Furthermore, different displays may have adifferent response to the same pixel values. For example, a CRT has aGaussian intensity distribution about each pixel, while an LCD has asquare intensity distribution with a sharp cut-off in intensity aboutevery pixel. Thus, a user may be able to obtain the same visual effectfrom a CRT and from an LCD, for example, by dynamically adjusting thefilter type, the filter function and/or the filter support.

In one embodiment, the user may be able to change the filter type,filter function and/or filter support on a per region basis. Forexample, a background scene may be more appropriately displayed using asofter filter than the foreground portions of the scene.

In a second embodiment, the graphics system may be operable todynamically adjust the filter type, filter function and/or the filtersupport in response to measurements obtained by a display-monitoringsystem coupled to the graphics system. An example of adisplay-monitoring system may be a video camera configured to capturethe image displayed by the display device. In one embodiment, aftercapturing the image frames from the video camera, the graphics systemcomputes a sharpness value for each of the captured frames. The graphicssystem may also compute a sharpness value for every other frame, everyother two frames, etc. if computational power is limited.

The graphics system may be further configured to compare the calculatedsharpness value to a desired sharpness value. In response to thecalculated sharpness value being above or below the desired value, thegraphics system may dynamically adjust the filter type, the filterfunction and/or the filter support in order to return the sharpnessvalue within a certain percentage of the desired value. For example, thegraphics system may accomplish this by choosing different filter typesand/or by adjusting the filter parameters, such as raising or loweringthe filtering coefficients, adjusting the width of the filter, orextending or restricting the support of the filter (i.e., the bounds ofthe filter).

In another embodiment, the graphics system may be configured to computea similarity value for each frame by comparing the captured imageprovided by the display-monitoring device to the generated outputpixels. The graphics system may be further configured to compare thesimilarity value to a desired similarity value. In response to thesimilarity value being below a desired threshold, the graphics systemmay dynamically adjust the filter type and/or the filter parameters inorder to obtain a similarity value for subsequent frames that is abovethe desired threshold.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing, as well as other objects, features, and advantages ofthis invention may be more completely understood by reference to thefollowing detailed description when read together with the accompanyingdrawings in which:

FIG. 1 illustrates one embodiment of a computer system that includes oneembodiment of a graphics system;

FIG. 2 is a simplified block diagram of the computer system of FIG. 1;

FIG. 3 is a block diagram illustrating more details of one embodiment ofthe graphics system of FIG. 1;

FIG. 4 is diagram illustrating traditional pixel calculation;

FIG. 5A is diagram illustrating one embodiment of super-sampling;

FIG. 5B is diagram illustrating a random distribution of samples;

FIG. 6 is a diagram illustrating details of one embodiment of a graphicssystem having one embodiment of a variable resolution super-sampledsample buffer;

FIG. 7 is a diagram illustrating details of another embodiment of agraphics system having one embodiment of a variable resolutionsuper-sampled sample buffer;

FIG. 8 is a diagram illustrating details of three different embodimentsof sample positioning schemes;

FIG. 9 is a diagram illustrating details of one embodiment of a samplepositioning scheme;

FIG. 10 is a diagram illustrating details of another embodiment of asample positioning scheme;

FIG. 11 is a diagram illustrating details of method of convertingsamples to pixels in parallel;

FIG. 11A is a diagram illustrating more details of the embodiment fromFIG. 11;

FIG. 11B is a diagram illustrating details of one embodiment of a methodfor dealing with boundary conditions;

FIG. 12 is a flowchart illustrating one embodiment of a method fordrawing samples into a super-sampled sample buffer;

FIG. 12A is a diagram illustrating one embodiment for coding trianglevertices;

FIG. 13 is a diagram illustrating one embodiment of a method forcalculating pixels from samples;

FIG. 14 is a diagram illustrating details of one embodiment of a pixelconvolution for an example set of samples;

FIG. 15 is a diagram illustrating one embodiment of a method fordividing a super-sampled sample buffer into regions;

FIG. 16 is a diagram illustrating another embodiment of a method fordividing a super-sampled sample buffer into regions;

FIG. 17 is a diagram illustrating yet another embodiment of a method fordividing a super-sampled sample buffer into regions;

FIGS. 18A-B are diagrams illustrating one embodiment of a graphicssystem configured to utilize input from an eye tracking or head trackingdevice;

FIGS. 19A-B are diagrams illustrating one embodiment of a graphicssystem configured to vary region position according to the position of acursor or visual object;

FIG. 20 is a diagram of one embodiment of a computer network connectingmultiple computers;

FIG. 21 shows one embodiment of a histogram of pixel negativity valuesused to compute the frame negativity value for a current frame;

FIG. 22 shows another embodiment of a histogram having cell boundariesat successive powers of two;

FIG. 23A shows one embodiment of a truncated sinc filter as a functionof radius;

FIG. 23B shows one embodiment of a Catmull-Rom filter as a function ofradius;

FIG. 23C shows one embodiment of a cubic B-spline filter;

FIG. 23D illustrates a parameter square for the Mitchell-Netravalifilter family;

FIG. 23E illustrates a cardinal cubic spline filter, i.e. aMitchell-Netravali filter with parameters B=0 and C=1;

FIG. 24 illustrates an upward shifted and truncated sinc filter, whichthe minimum of the filter has be raised to the level of the horizontalaxis;

FIG. 25 illustrates one embodiment of a graphics system configured todynamically adjust the sample-to-pixel calculation filter based on framenegativity;

FIG. 26 shows a flowchart describing one embodiment of a method foradjusting the filter in response to the magnitude of the framenegativity value being above a certain threshold;

FIG. 27 shows a computer system, wherein a user, using filter controlinterface 702, may adjust the filter type, filter function and/or filtersupport;

FIG. 28 shows one embodiment of a graphics system enabling a user todynamically control the filter type, filter function and/of filtersupport;

FIG. 29 shows a flowchart describing one embodiment of a method foradjusting the filter type, the filter function and/or the filter supportin response to receiving user input;

FIG. 30 shows one embodiment of a display monitoring system forcapturing displayed images, and adjusting filter properties in responseto the captured images;

FIG. 31 shows a flowchart describing one embodiment of a method foradjusting the filter type, filter function and/or the filter support inresponse to a display-monitoring device capturing displayed images.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that the drawings and detaileddescription thereto are not intended to limit the invention to theparticular forms disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention as defined by the appendedclaims. Please note that the section headings used herein are fororganizational purposes only and are not meant to limit the descriptionor claims. The word “may” is used in this application in a permissivesense (i.e., having the potential to, being able to), not a mandatorysense (i.e., must). Similarly, the word include, and derivationsthereof, are used herein to mean “including, but not limited to.”

DETAILED DESCRIPTION OF SEVERAL EMBODIMENTS

Computer System—FIG. 1

FIG. 1 shows one embodiment of a computer system 80 that includes athree-dimensional (3-D) graphics system. The computer system may becomprised in any of various systems, including a traditional PC, networkPC, Internet appliance, a television, including HDTV systems andinteractive television systems, set top boxes, game console, personaldigital assistants (PDAs), and other devices which display 2D and or 3Dgraphics, among others.

As shown, the computer system 80 comprises a system unit 82 and a videomonitor or display device 84 coupled to the system unit 82. The displaydevice 84 may be any of various types of display monitors or devices(e.g., a CRT, LCD, or gas-plasma display). Various input devices may beconnected to the computer system, including a keyboard 86 and/or a mouse88, or other input device (e.g., a trackball, digitizer, tablet,six-degree of freedom input device, head tracker, eye tracker, dataglove, body sensors, etc.). Application software may be executed by thecomputer system 80 to display 3-D graphical objects on display device84. As described further below, the 3-D graphics system in computersystem 80 includes a super-sampled sample buffer with a programmablereal-time sample-to-pixel calculation unit to improve the quality andrealism of images displayed on display device 84.

Computer System Block Diagram—FIG. 2

Referring now to FIG. 2, a simplified block diagram illustrating thecomputer system of FIG. 1 is shown. Elements of the computer system thatare not necessary for an understanding of the present invention are notshown for convenience. As shown, the computer system 80 includes acentral processing unit (CPU) 102 coupled to a high-speed memory bus orsystem bus 104 also referred to as the host bus 104. A system memory 106may also be coupled to high-speed bus 104.

Host processor 102 may comprise one or more processors of varying types,e.g., microprocessors, multi-processors and CPUs. The system memory 106may comprise any combination of different types of memory subsystems,including random access memories, (e.g., static random access memoriesor “SRAMs”, synchronous dynamic random access memories or “SDRAMs”, andRambus dynamic access memories or “RDRAM”, among others) and massstorage devices. The system bus or host bus 104 may comprise one or morecommunication or host computer buses (for communication between hostprocessors, CPUs, and memory subsystems) as well as specializedsubsystem buses.

A 3-D graphics system or graphics system 112 according to the presentinvention is coupled to the high-speed memory bus 104. The 3-D graphicssystem 112 may be coupled to the bus 104 by, for example, a crossbarswitch or other bus connectivity logic. It is assumed that various otherperipheral devices, or other buses, may be connected to the high-speedmemory bus 104. It is noted that the 3-D graphics system may be coupledto one or more of the buses in computer system 80 and/or may be coupledto various types of buses. In addition, the 3D graphics system may becoupled to a communication port and thereby directly receive graphicsdata from an external source, e.g., the Internet or a network. As shownin the figure, display device 84 is connected to the 3-D graphics system112 comprised in the computer system 80.

Host CPU 102 may transfer information to and from the graphics system112 according to a programmed input/output (I/O) protocol over host bus104. Alternately, graphics system 112 may access the memory subsystem106 according to a direct memory access (DMA) protocol or throughintelligent bus mastering.

A graphics application program conforming to an application programminginterface (API) such as OpenGL® or Java 3D™ may execute on host CPU 102and generate commands and data that define a graphics primitive(graphics data) such as a polygon for output on display device 84. Asdefined by the particular graphics interface used, these primitives mayhave separate color properties for the front and back surfaces. Hostprocessor 102 may transfer these graphics data to memory subsystem 106.Thereafter, the host processor 102 may operate to transfer the graphicsdata to the graphics system 112 over the host bus 104. In anotherembodiment, the graphics system 112 may read in geometry data arraysover the host bus 104 using DMA access cycles. In yet anotherembodiment, the graphics system 112 may be coupled to the system memory106 through a direct port, such as the Advanced Graphics Port (AGP)promulgated by Intel Corporation.

The graphics system may receive graphics data from any of varioussources, including the host CPU 102 and/or the system memory 106, othermemory, or from an external source such as a network, e.g., theInternet, or from a broadcast medium, e.g., television, or from othersources.

As will be described below, graphics system 112 may be configured toallow more efficient microcode control, which results in increasedperformance for handling of incoming color values corresponding to thepolygons generated by host processor 102. Note that while graphicssystem 112 is depicted as part of computer system 80, graphics system112 may also be configured as a stand-alone device (e.g., with its ownbuilt-in display) or as part of another device, such as a PDA,television, or any other device with display capabilities. Graphicssystem 112 may also be configured as a single-chip device or as part ofa system-on-a-chip or a multi-chip module.

Graphics System—FIG. 3

Referring now to FIG. 3, a block diagram illustrating details of oneembodiment of graphics system 112 is shown. As shown in the figure,graphics system 112 may comprise one or more graphics processors 90, oneor more super-sampled sample buffers 162, and one or moresample-to-pixel calculation units 170A-D. Graphics system 112 may alsocomprise one or more digital-to-analog converters (DACs) 178A-B.Graphics processor 90 may be any suitable type of high performanceprocessor (e.g., specialized graphics processors or calculation units,multimedia processors, DSPs, or general purpose processors). In oneembodiment, graphics processor 90 may comprise one or more renderingunits 150A-D. In the embodiment shown, however, graphics processor 90also comprises one or more control units 140, one or more data memories152A-D, and one or more schedule units 154. Sample buffer 162 maycomprises one or more sample memories 160A-160N as shown in the figure.

A. Control Unit

Control unit 140 operates as the interface between graphics system 112and computer system 80 by controlling the transfer of data betweengraphics system 112 and computer system 80. In embodiments of graphicssystem 112 that comprise two or more rendering units 150A-D, controlunit 140 may also divide the stream of data received from computersystem 80 into a corresponding number of parallel streams that arerouted to the individual rendering units 150A-D. The graphics data maybe received from computer system 80 in a compressed form. This mayadvantageously reduce the bandwidth requirements between computer system80 and graphics system 112. In one embodiment, control unit 140 may beconfigured to split and route the data stream to rendering units 150A-Din compressed form.

The graphics data may comprise one or more graphics primitives. As usedherein, the term graphics primitive includes polygons, parametricsurfaces, splines, NURBS (non-uniform rational B-splines), sub-divisionssurfaces, fractals, volume primitives, and particle systems. Thesegraphics primitives are described in detail in the text book entitled“Computer Graphics: Principles and Practice” by James D. Foley, et al.,published by Addison-Wesley Publishing Co., Inc., 1996. Note polygonsare referred to throughout this detailed description for simplicity, butthe embodiments and examples described may also be used with graphicsdata comprising other types of graphics primitives.

B. Rendering Units

Rendering units 150A-D (also referred to herein as draw units) areconfigured to receive graphics instructions and data from control unit140 and then perform a number of functions, depending upon the exactimplementation. For example, rendering units 150A-D may be configured toperform decompression (if the data is compressed), transformation,clipping, lighting, texturing, depth cueing, transparency processing,set-up, and screen space rendering of various graphics primitivesoccurring within the graphics data. Each of these features is describedseparately below.

Depending upon the type of compressed graphics data received, renderingunits 150A-D may be configured to perform arithmetic decoding,run-length decoding, Huffman decoding, and dictionary decoding (e.g.,LZ77, LZSS, LZ78, and LZW). In another embodiment, rendering units150A-D may be configured to decode graphics data that has beencompressed using geometric compression. Geometric compression of 3Dgraphics data may achieve significant reductions in data size whileretaining most of the image quality. Two methods for compressing anddecompressing 3D geometry are described in

-   -   U.S. Pat. No. 5,793,371, application Ser. No. 08/511,294, (filed        on Aug. 4, 1995, entitled “Method And Apparatus For Geometric        Compression Of Three-Dimensional Graphics Data,” Attorney Docket        No. 5181-05900) and    -   U.S. patent application Ser. No. 09/095,777, filed on Jun. 11,        1998, entitled “Compression of Three-Dimensional Geometry Data        Representing a Regularly Tiled Surface Portion of a Graphical        Object,” Attorney Docket No. 5181-06602).        In embodiments of graphics system 112 that support        decompression, the graphics data received by each rendering unit        150 is decompressed into one or more graphics “primitives” which        may then be rendered. The term primitive refers to components of        objects that define its shape (e.g., points, lines, triangles,        polygons in two or three dimensions, polyhedra, or free-form        surfaces in three dimensions). Rendering units 150 may be any        suitable type of high performance processor (e.g., specialized        graphics processors or calculation units, multimedia processors,        DSPs, or general purpose processors).

Transformation refers to manipulating an object and includes translatingthe object (i.e., moving the object to a different location), scalingthe object (i.e., stretching or shrinking), and rotating the object(e.g., in three-dimensional space, or “3-space”).

Lighting refers to calculating the illumination of the objects withinthe displayed image to determine what color and or brightness eachindividual object will have. Depending upon the shading algorithm beingused (e.g., constant, Gourand, or Phong), lighting may be evaluated at anumber of different locations. For example, if constant shading is used(i.e., each pixel of a polygon has the same lighting), then the lightingneed only be calculated once per polygon. If Gourand shading is used,then the lighting is calculated once per vertex. Phong shadingcalculates the lighting on a per-pixel basis.

Clipping refers to the elimination of graphics primitives or portions ofgraphics primitives that lie outside of a 3-D view volume in worldspace. The 3-D view volume may represent that portion of world spacethat is visible to a virtual observer situated in world space. Forexample, the view volume may be a solid truncated pyramid generated by a2-D view window and a viewpoint located in world space. The solidtruncated pyramid may be imagined as the union of all rays emanatingfrom the viewpoint and passing through the view window. The viewpointmay represent the world space location of the virtual observer.Primitives or portions of primitives that lie outside the 3-D viewvolume are not currently visible and may be eliminated from furtherprocessing. Primitives or portions of primitives that lie inside the 3-Dview volume are candidates for projection onto the 2-D view window.

In order to simplify the clipping and projection computations,primitives may be transformed into a second, more convenient, coordinatesystem referred to herein as the viewport coordinate system. In viewportcoordinates, the view volume maps to a canonical 3-D viewport that maybe more convenient for clipping against.

Graphics primitives or portions of primitives that survive the clippingcomputation may be projected onto a 2-D viewport depending on theresults of a visibility determination. Instead of clipping in 3-D,graphics primitives may be projected onto a 2-D view plane (whichincludes the 2-D viewport) and then clipped with respect to the 2-Dviewport.

Screen-space rendering refers to the calculations performed to actuallycalculate the data used to generate each pixel that will be displayed.In prior art systems, each pixel is calculated and then stored in aframe buffer. The contents of the frame buffer are then output to thedisplay device to create the final image. In the embodiment of graphicssystem 112 shown in the figure, however, rendering units 150A-Dcalculate “samples” instead of actual pixel data. This allows renderingunits 150A-D to “super-sample” or calculate more than one sample perpixel. Super-sampling is described in greater detail below. Therendering units 150A-D may also generate a greater area of samples thanthe viewable area of the display 84 for various effects such as panningand zooming. Note that rendering units 150A-B may comprises a number ofsmaller functional units, e.g., a separate set-up decompress unit and alighting unit.

More details on super-sampling are discussed in the following books:

-   -   “Principles of Digital Image Synthesis” by Andrew S. Glassner,        1995, Morgan Kaufman Publishing (Volume 1);    -   “The Renderman Companion” by Steve Upstill, 1990, Addison Wesley        Publishing; and    -   “Advanced Renderman: Beyond the Companion” by Anthony A.        Apodaca.        C. Data Memories

Each rendering unit 150A-D may be coupled to an instruction and datamemory 152A-D. In one embodiment, each data memory 152A-D may beconfigured to store both data and instructions for rendering units150A-D. While implementations may vary, in one embodiment each datamemory 152A-D may comprise two 8 MByte SDRAMs providing a total of 16MBytes of storage for each rendering unit 150A-D. In another embodiment,RDRAMs (Rambus DRAMs) may be used to support the decompression andset-up operations of each rendering unit, while SDRAMs may be used tosupport the draw functions of rendering units 150A-D.

D. Schedule Unit

Schedule unit 154 may be coupled between the rendering units 150A-D andthe sample memories 160A-N. Schedule unit 154 is configured to sequencethe completed samples and store them in sample memories 160A-N. Note inlarger configurations, multiple schedule units 154 may be used inparallel. In one embodiment, schedule unit 154 may be implemented as acrossbar switch.

E. Sample Memories

Super-sampled sample buffer 162 comprises sample memories 160A-160N,which are configured to store the plurality of samples generated by therendering units. As used herein, the term “sample buffer” refers to oneor more memories that store samples. As previously noted, samples arerendered into the sample buffer 162 at positions in the sample bufferwhich correspond to locations in screen space on the display. Thepositions may be calculated using various methods, such as grid-basedposition generation, stochastic position generation, or perturbed gridposition generation, among others. The positions may be calculated orprogrammatically determined on a per frame basis, a per bin basis, oreven a per sample basis. In one embodiment, sample position informationis stored with the samples in the sample buffer.

One or more samples are then filtered to form each output pixels (i.e.,pixels to be displayed on a display device). The number of samplesstored may be greater than, equal to, or less than the total number ofpixels output to the display device to refresh a single frame. Eachsample may correspond to one or more output pixels. As used herein, asample “corresponds” to an output pixel when the sample's informationcontributes to final output value of the pixel. Note, however, that somesamples may contribute zero to their corresponding output pixel afterfiltering takes place.

Stated another way, the sample buffer stores a plurality of samples thathave positions that correspond to locations in screen space on thedisplay, i.e., the samples contribute to one or more output pixels onthe display. The number of stored samples may be greater than the numberof pixel locations, and more than one sample may be combined in theconvolution (filtering) process to generate a particular output pixeldisplayed on the display device. Any given sample may contribute to oneor more output pixels.

Sample memories 160A-160N may comprise any of a number of differenttypes of memories (e.g., SDRAMs, SRAMs, RDRAMs, 3DRAMs, ornext-generation 3DRAMs) in varying sizes. In one embodiment, eachschedule unit 154 is coupled to four banks of sample memories, whereineach bank comprises four 3DRAM-64 memories. Together, the 3DRAM-64memories may form a 116-bit deep super-sampled sample buffer that storesmultiple samples per pixel. For example, in one embodiment, each samplememory 160A-160N may store up to sixteen samples per pixel.

3DRAM-64 memories are specialized memories configured to support fullinternal double buffering with single buffered Z in one chip. The doublebuffered portion comprises two RGBX buffers, wherein X is a fourthchannel that can be used to store other information (e.g., alpha).3DRAM-64 memories also have a lookup table that takes in window IDinformation and controls an internal 2-1 or 3-1 multiplexer that selectswhich buffer's contents will be output. 3DRAM-64 memories arenext-generation 3DRAM memories that may soon be available fromMitsubishi Electric Corporation's Semiconductor Group. In oneembodiment, 32 chips used in combination are sufficient to create adouble-buffered 1280×1024 super-sampled sample buffer.

Since the memories are internally double-buffered, the input pins foreach of the two frame buffers in the double-buffered system are timemultiplexed (using multiplexers within the memories). The output pinsmay similarly be time multiplexed. This allows reduced pin count whilestill providing the benefits of double buffering. 3DRAM-64 memoriesfurther reduce pin count by not having z output pins. Since z comparisonand memory buffer selection is dealt with internally, this may simplifysample buffer 162 (e.g., using less or no selection logic on the outputside). Use of 3DRAM-64 also reduces memory bandwidth since informationmay be written into the memory without the traditional process ofreading data out, performing a z comparison, and then writing data backin. Instead, the data may be simply written into the 3DRAM-64, with thememory performing the steps described above internally.

However, in other embodiments of graphics system 112, other memories(e.g., SDRAMs, SRAMs, RDRAMs, or current generation 3DRAMs) may be usedto form sample buffer 162.

Graphics processor 90 may be configured to generate a plurality ofsample positions according to a particular sample-positioning scheme(e.g., a regular grid, a perturbed regular grid, stochastic, etc.). Thesample position information for each of the samples may be stored forlater use by the sample-to-pixel calculation unit(s). For example, thegraphics processor 90 may store the sample position information in thesample buffer with the samples, or may store the sample positioninformation in a separate sample position memory. Alternatively, thesample positions (or position information (e.g., offsets that are addedto regular grid positions to form the sample positions) may bepre-determined or pre-computed using one of the above schemes and simplyread from the sample position memory (e.g., a RAM/ROM table). The sampleposition information may be pre-computed by the graphics processor, bythe host CPU, or by other logic.

The sample position information may comprise coordinate values relativeto a sample buffer coordinate system, e.g., coordinate values relativeto the display screen space. The sample position information may alsocomprise offset values, wherein the offset values are relative topre-defined locations in the sample buffer, such as a pre-definedregular grid, pre-defined bins, or pixel center coordinates.

Upon receiving a polygon that is to be rendered, graphics processor 90determines which samples reside within the polygon based upon the sampleposition information. Graphics processor 90 renders the samples thatreside within the polygon and stores rendered samples in sample memories160A-N. Note that as used herein the terms “render” and “draw” are usedinterchangeably and refer to calculating color values for samples. Depthsamples, including one or more of color values, depth values, alphavalues, blur values, and other per-sample values may also be calculatedin the rendering or drawing process.

F. Sample-to-pixel Calculation Units

Sample-to-pixel calculation units 170A-D (sometimes collectivelyreferred to as sample-to-pixel calculation unit 170) may be coupledbetween sample memories 160A-N and DACs 178A-B. Sample-to-pixelcalculation units 170A-D are configured to read selected samples fromsample memories 160A-N, wherein the 160A-N samples are selected based onthe position information of the samples, and then perform a convolution(e.g., a filtering and weighting function or a low pass filter) on thesamples to generate the output pixel values which are output to DACs178A-B. The sample-to-pixel calculation units 170A-D may be programmableto allow them to perform different filter functions at different times,depending upon the type of output desired.

In one embodiment, the sample-to-pixel calculation units 170A-D mayimplement a super-sample reconstruction band-pass filter to convert thesuper-sampled sample buffer data (stored in sample memories 160A-N) tosingle pixel values. The support of the band-pass filter may cover arectangular area M pixels high and N pixels wide. Thus, the number ofsamples covered by the band-pass filter is approximately equal to M·N·S,where S is the number of samples per pixel. A variety of values for M,N, & S are contemplated. For example, in one embodiment of the band-passfilter M=N=5. It is noted that with certain sample positioning schemes,the number of samples that fall within the filter support may vary asthe filter center (i.e., pixel center) moves.

In other embodiments, calculation units 170A-D may filter a selectednumber of samples to calculate an output pixel. The selected samples maybe multiplied by a spatial weighting function that gives weights tosamples based on their position with respect to the center of the pixelbeing calculated.

The filtering operations performed by sample-to-pixel calculation units170 may use any of a variety of filters, either alone or in combination.For example, the filtering operations may comprise convolution with abox filter, a tent filter, a cylindrical filter, a cone filter, aGaussian filter, any filter in the Mitchell-Netravali family (e.g. theCatmull-Rom filter), a windowed Sinc filter, etc. Furthermore, thesupport of the filters used by sample-to-pixel calculation units 170 maybe circular, elliptical, rectangular (e.g., square), triangular,hexagonal, etc.

Sample-to-pixel calculation units 170A-D may also be configured with oneor more of the following features: color look-up using pseudo colortables, direct color, inverse gamma correction, filtering of samples topixels, and conversion of pixels to non-linear light space. Otherfeatures of sample-to-pixel calculation units 170A-D may includeprogrammable video timing generators, programmable pixel clocksynthesizers, cursor generators, color space converters, and crossbarfunctions. Once the sample-to-pixel calculation units have manipulatedthe timing and color of each pixel, the pixels are output to DACs178A-B.

G. DACs

DACs 178A-B operate as the final output stage of graphics system 112.The DACs 178A-B serve to translate the digital pixel data received fromcross units 174A-B into analog video signals that are then sent to thedisplay device. Note in one embodiment DACs 178A-B may be bypassed oromitted completely in order to output digital pixel data in lieu ofanalog video signals. This may be useful when display device 84 is basedon a digital technology (e.g., an LCD-type display, LCOS display, or adigital micro-mirror display).

Super-Sampling—FIGS. 4-5

Turning now to FIG. 4, an example of traditional, non-super-sampledpixel value calculation is illustrated. Each pixel has exactly one datapoint calculated for it, and the single data point is located at thecenter of the pixel. For example, only one data point (i.e., sample 74)contributes to value of pixel 70.

Turning now to FIG. 5A, an example of one embodiment of super-samplingis illustrated. In this embodiment, a number of samples are calculated.The number of samples may be related to the number of pixels orcompletely independent of the number of pixels. In this example, thereare 18 samples distributed in a regular grid across nine pixels. Evenwith all the samples present in the figure, a simple one to onecorrelation could be made (e.g., by throwing out all but the samplenearest to the center of each pixel). However, the more interesting caseis performing a filtering function on multiple samples to determine thefinal pixel values. Also, as noted above, a single sample can be used togenerate a plurality of output pixels, i.e., sub-sampling.

A circular filter 72 is illustrated in the figure. In this example,samples 74A-B both contribute to the final value of pixel 70. Thisfiltering process may advantageously improve the realism of the imagedisplayed by smoothing abrupt edges in the displayed image (i.e.,performing anti-aliasing). Filter 72 may simply average samples 74A-B toform the final value of output pixel 70, or it may increase thecontribution of sample 74B (at the center of pixel 70) and diminish thecontribution of sample 74A (i.e., the sample farther away from thecenter of pixel 70). Circular filter 72 is repositioned for each outputpixel being calculated so the center of filter 72 coincides with thecenter position of the pixel being calculated. Other filters and filterpositioning schemes are also possible and contemplated.

Turning now to FIG. 5B, another embodiment of super-sampling isillustrated. In this embodiment, however, the samples are positionedrandomly. More specifically, different sample positions are selected andprovided to graphics processor 90 (and render units 150A-D), whichcalculate color information to form samples at these differentlocations. Thus the number of samples falling within filter 72 may varyfrom pixel to pixel.

Super-Sampled Sample Buffer with Real-Time Convolution—FIGS. 6-13

FIGS. 6A, 6B, 7A and 7B illustrate possible configurations for the flowof data through one embodiment of graphics system. As the figures show,geometry data 350 is received by graphics system 112 and used to performdraw or render process 352. The draw process 352 is implemented by oneor more of control unit 140, rendering units 150, memories 152, andschedule unit 154. Geometry data 350 comprises data for one or morepolygons. Each polygon comprises a plurality of vertices (e.g., threevertices in the case of a triangle), some of which may be shared. Datasuch as x, y, and z coordinates, color data, lighting data and texturemap information may be included for each vertex.

In addition to the vertex data, draw process 352 (which may be performedby rendering units 150A-D) also receives sample position informationfrom a sample position memory 354. Draw process 352 selects the samplesthat fall within the polygon currently being rendered and calculates aset of values (e.g. red, green, blue, z, alpha, and/or depth of fieldinformation) for each of these samples based on their respectivepositions within the polygon. For example, the z value of a sample thatfalls within a triangle may be interpolated from the known z values ofthe three vertices. Each set of computed sample values are stored intosample buffer 162.

In one embodiment, sample position memory 354 is embodied withinrendering units 150A-D. In another embodiment, sample position memory354 may be realized as part of memories 152A-152D, or as a separatememory.

Sample position memory 354 may store sample positions in terms of theirsample (virtual) screen coordinates (X,Y). Alternatively, sampleposition memory 354 may be configured to store only offsets dX and dYfor the samples with respect to positions on a regular grid. Storingonly the offsets may use less storage space than storing the entirecoordinates (X,Y) for each sample. The sample position informationstored in sample position memory 354 may be read by a dedicatedsample-position calculation unit (not shown) and processed to calculatesample positions for graphics processing unit 90.

In another embodiment, sample position memory 354 may be configured tostore a table of random numbers. Sample position memory 354 may alsocomprise dedicated hardware to generate one or more different types ofregular grids. This hardware may be programmable. The stored randomnumbers may be added as offsets to the regular grid positions generatedby the hardware. In one embodiment, sample position memory 354 may beprogrammable to access or “unfold” the random number table in a numberof different ways, and thus may deliver more apparent randomness for agiven length of the random number table. Thus, a smaller table may beused without generating the visual artifacts caused by simple repetitionof sample position offsets.

Sample-to-pixel calculation process 360 uses the same sample positionsas draw process 352. Thus, in one embodiment, sample position memory 354may generate a sequence of random offsets to compute sample positionsfor draw process 352, and may subsequently regenerate the same sequenceof random offsets to compute the same sample positions forsample-to-pixel calculation process 360. In other words, the unfoldingof the random number table may be repeatable. Thus, it may not benecessary to store sample positions at the time of their generation fordraw process 352.

As shown in FIGS. 6A and 6B, the sample position information may bestored in a separate sample position memory 354. For example, the sampleposition information (e.g., offsets that are added to regular gridpositions to form the sample positions) may be pre-determined orpre-computed using one of the above schemes and read from the sampleposition memory 354 (e.g., a RAM/ROM table) during rendering. The samplepositions may be pre-computed by the graphics processor 90, by the hostCPU, or by other logic as noted above. Alternatively, the graphicsprocessor 90 may generate the sample position information duringrendering and store the sample position information In one embodiment,sample position memory 354 may comprise a RAM/ROM that containsstochastic sample points (or locations) for different total samplecounts per bin. As used herein, the term “bin” refers to a region orarea in screen-space and contains however many samples are in that area(e.g., the bin may be 1×1 pixels in area, 2×2 pixels in area, etc.). Theuse of bins may simplify the storage and access of samples in samplebuffer 162. A number of different bin sizes may be used (e.g., onesample per bin, four samples per bin, etc.). In the preferredembodiment, each bin has an xy-position that corresponds to a particularlocation on the display. The bins are preferably regularly spaced. Inthis embodiment, the bins' xy-positions may be determined from the bin'sstorage location within sample buffer 162. The bins' positionscorrespond to particular positions on the display. In some embodiments,the bin positions may correspond to pixel centers, while in otherembodiments the bin positions correspond to points that are locatedbetween pixel centers. The specific position of each sample within a binmay be determined by looking up the sample's offset in the RAM/ROM table(the offsets may be stored relative to the corresponding bin position).However, depending upon the implementation, not all bin sizes may have aunique RAM/ROM entry. Some bin sizes may simply read a subset of thelarger bin sizes' entries. In one embodiment, each supported size has atleast four different sample-position scheme variants, which may reducefinal image artifacts due to repeating sample positions.

In one embodiment, position memory 354 may store pairs of 6-bit numbers,each pair comprising an x-offset and a y-offset (other possible offsetsare also possible, e.g., a time offset, a z-offset, etc.). When added toa bin position, each pair defines a particular position in screen space.The term “screen space” refers generally to the coordinate system of thedisplay device. To improve read times, memory 354 may be constructed ina wide/parallel manner so as to allow the memory to output more than onesample location per clock cycle.

Once the sample positions have been read from sample position memory354, draw process 352 selects the sample positions that fall within thepolygon currently being rendered. Draw process 352 then calculates the zand color information (which may include alpha or other depth of fieldinformation values) for each of these samples and stores the data intosample buffer 162. In one embodiment, the sample buffer may onlysingle-buffer z values (and perhaps alpha values) while double bufferingother sample components such as color. Unlike prior art systems,graphics system 112 may double buffer all samples (although not allsample components may be double-buffered, i.e., the samples may havecomponents that are not double-buffered). In one embodiment, the samplesare stored into sample buffer 162 in bins. In some embodiments, the sizeof bins, i.e., the quantity of samples within a bin, may vary from frameto frame and may also vary across different regions of display device 84within a single frame. For example, bins along the edges of displaydevice may comprise only one sample, while bins corresponding to pixelsnear the center of display device 84 may comprise sixteen samples. Notethe area of bins may vary from region to region. The use of bins will bedescribed in greater detail below in connection with FIG. 11.

In parallel and independently of draw process 352, filter process 360 isconfigured to read samples from sample buffer 162, filter (i.e., filter)them, and then output the resulting output pixel to display device 84.Sample-to-pixel calculation units 170 implement filter process 380.Thus, for at least a subset of the output pixels, the filter process isoperable to filter a plurality of samples to produce a respective outputpixel. In one embodiment, filter process 360 is configured to: (i)determine the distance from each sample to the center of the outputpixel being filtered; (ii) multiply the sample's components (e.g., colorand alpha) with a filter value that is a specific (programmable)function of the distance; (iii) sum all the weighted samples thatcontribute to the output pixel, and (iv) normalize the resulting outputpixel. The filter process 360 is described in greater detail below (seedescription accompanying FIGS. 11, 12, and 14). Note the extent of thefilter function need not be circular (i.e., it may be a function of xand y instead of the distance), but even if the extent is circular, thefilter function need not be circularly symmetrical. The filter's“extent” is the area within which samples can influence the particularpixel being calculated with the filter.

Turning now to FIG. 7, a diagram illustrating an alternate embodiment ofgraphics system 112 is shown. In this embodiment, two or more sampleposition memories 354A and 354B are utilized. Thus, the sample positionmemories 354A-B are essentially double-buffered. If the sample positionsare kept the same from frame to frame, then the sample positions may besingle buffered. However, if the sample positions may vary from frame toframe, then graphics system 112 may be advantageously configured todouble-buffer the sample positions. The sample positions may be doublebuffered on the rendering side (i.e., memory 354A may be doublebuffered) and or the filter/convolve side (i.e., memory 354B may bedouble buffered). Other combinations are also possible. For example,memory 354A may be single-buffered, while memory 354B is doubledbuffered. This configuration may allow one side of memory 354B to beused for refreshing (i.e., by filter/convolve process 360) while theother side of memory 354B is used being updated. In this configuration,graphics system 112 may change sample position schemes on a per-framebasis by shifting the sample positions (or offsets) from memory 354A todouble-buffered memory 354B as each frame is rendered. Thus, thepositions used to calculate the samples (read from memory 354A) arecopied to memory 354B for use during the filtering process (i.e., thesample-to-pixel conversion process). Once the position information hasbeen copied to memory 354B, position memory 354A may then be loaded withnew sample position offsets to be used for the second frame to berendered. In this way the sample position information follows thesamples from the draw/render process to the filter process.

Yet another alternative embodiment may store tags to offsets with thesamples themselves in super-sampled sample buffer 162. These tags may beused to look-up the offset/perturbation associated with each particularsample.

Sample Positioning Schemes

FIG. 8 illustrates a number of different sample positioning schemes. Inregular grid positioning scheme 190, each sample is positioned at anintersection of a regularly-spaced grid. Note however, that as usedherein the term “regular grid” is not limited to square grids. Othertypes of grids are also considered “regular” as the term is used herein,including, but not limited to, rectangular grids, hexagonal grids,triangular grids, logarithmic grids, and semi-regular lattices such asPenrose tiling.

Perturbed regular grid positioning scheme 192 is based upon the previousdefinition of a regular grid. However, the samples in perturbed regulargrid scheme 192 may be offset from their corresponding gridintersection. In one embodiment, the samples may be offset by a randomangle (e.g., from 0° to 360°) and a random distance, or by random x andy offsets, which may or may not be limited to a predetermined range. Theoffsets may be generated in a number of ways, e.g., by hardware basedupon a small number of seeds, looked up from a table, or by using apseudo-random function. Once again, perturbed regular gird scheme 192may be based on any type of regular grid (e.g., square, or hexagonal). Arectangular or hexagonal perturbed grid may be particularly desirabledue to the geometric properties of these grid types.

Stochastic sample positioning scheme 194 represents a third potentialtype of scheme for positioning samples. Stochastic sample positioninginvolves randomly distributing the samples across a region (e.g., thedisplayed region on a display device or a particular window). Randompositioning of samples may be accomplished through a number of differentmethods, e.g., using a random number generator such as an internal clockto generate pseudo-random numbers. Random numbers or positions may alsobe pre-calculated and stored in memory.

Turning now to FIG. 9, details of one embodiment of perturbed regulargrid scheme 192 are shown. In this embodiment, samples are randomlyoffset from a regular square grid by x- and y-offsets. As the enlargedarea shows, sample 198 has an x-offset 134 that specifies its horizontaldisplacement from its corresponding grid intersection point 196.Similarly, sample 198 also has a y-offset 136 that specifies itsvertical displacement from grid intersection point 196. The randomoffset may also be specified by an angle and distance. As with thepreviously disclosed embodiment that utilized angles and distances,x-offset 134 and y-offset 136 may be limited to a particular minimum andor maximum value or range of values.

Turning now to FIG. 10, details of another embodiment of perturbedregular grid scheme 192 are shown. In this embodiment, the samples aregrouped into “bins” 138A-D. In this embodiment, each bin comprises nine(i.e., 3×3) samples. Different bin sizes may be used in otherembodiments (e.g., bins storing 2×2 samples or 4×4 samples). In theembodiment shown, each sample's position is determined as an offsetrelative to the position of the bin. The position of the bins may bedefined as any convenient position related to the grid, e.g., the lowerleft-hand corners 132A-D as shown in the figure. For example, theposition of sample 198 is determined by summing x-offset 124 andy-offset 126 to the x and y coordinates of the corner 132D of bin 138D.As previously noted, this may reduce the size of the sample positionmemory used in some embodiments.

Turning now to FIG. 11, one possible method for rapidly convertingsamples stored in sample buffer 162 into pixels is shown. In thisembodiment, the contents of sample buffer 162 are organized into columns(e.g., Cols. 1-4). Each column in sample buffer 162 may comprise atwo-dimensional array of bins. The columns may be configured tohorizontally overlap (e.g., by one or more bins), and each column may beassigned to a particular sample-to-pixel calculation unit 170A-D for theconvolution process. The amount of the overlap may depend upon theextent of the filter being used. The example shown in the figureillustrates an overlap of two bins (each square such as square 188represents a single bin comprising one or more samples). Advantageously,this configuration may allow sample-to-pixel calculation units 170A-D towork independently and in parallel, with each sample-to-pixelcalculation unit 170A-D receiving and converting its own column.Overlapping the columns will eliminate visual bands or other artifactsappearing at the column boundaries for any operators larger than a pixelin extent.

Turning now to FIG. 11A, more details of one embodiment of a method forreading the samples from a super-sampled sample buffer are shown. As thefigure illustrates, the convolution filter kernel 400 travels acrosscolumn 414 (see arrow 406) to generate output pixels. One or moresample-to-pixel calculation units 170 may implement the convolutionfilter kernel 400. A bin cache 408 may used to provide quick access tothe samples that may potentially contribute to the output pixel. As theconvolution process proceeds, bins are read from the super-sampledsample buffer and stored in bin cache 408. In one embodiment, bins thatare no longer needed 410 are overwritten in the cache by new bins 412.As each pixel is generated, convolution filter kernel 400 shifts. Kernel400 may be visualized as proceeding in a sequential fashion within thecolumn in the direction indicated by arrow 406. When kernel 400 reachesthe end of the column, it may shift down one or more rows of samples andthen proceed again. Thus the convolution process proceeds in a scan linemanner, generating one column of output pixels for display.

Turning now to FIG. 11B, a diagram illustrating potential borderconditions is shown. In one embodiment, the bins that fall outside ofsample window 420 may be replaced with samples having predeterminedbackground colors specified by the user. In another embodiment, binsthat fall outside the window are not used by setting their weightingfactors to zero (and then dynamically calculating normalizationcoefficients). In yet another embodiment, the bins at the inside edge ofthe window may be duplicated to replace those outside the window. Thisis indicated by outside bin 430 being replaced by mirror inside bin 432.

FIG. 12 is a flowchart of one embodiment of a method for drawing orrendering sample pixels into a super-sampled sample buffer. Certain ofthe steps of FIG. 12 may occur concurrently or in different orders. Inthis embodiment, the graphics system receives graphics commands andgraphics data from the host CPU 102 or directly from main memory 106(step 200). Next, the instructions and data are routed to one or morerendering units 150A-D (step 202). If the graphics data is compressed(step 204), then the rendering units 150A-D decompress the data into auseable format, e.g., triangles (step 206). Next, the triangles areprocessed, e.g., converted to screen space, lit, and transformed (step208A). If the graphics system implements variable resolution supersampling, then the triangles are compared with the sample density regionboundaries (step 208B). In variable-resolution super-sampled samplebuffer implementations, different regions of the display device may beallocated different sample densities based upon a number of factors(e.g., the center of the attention on the screen as determined by eye orhead tracking). Sample density regions are described in greater detailbelow (see section entitled Variable Resolution Sample buffer below). Ifthe triangle crosses a region boundary (step 210), then the triangle maybe divided into two smaller polygons along the region boundary (step212). This may allow each newly formed triangle to have a single sampledensity. In one embodiment, the graphics system may be configured tosimply use the entire triangle twice (i.e., once in each region) andthen use a bounding box to effectively clip the triangle.

Next, one of the sample position schemes (e.g., regular grid, perturbedregular grid, or stochastic) are selected from the sample positionmemory 184 (step 214). The sample position scheme will generally havebeen pre-programmed into the sample position memory 184, but may also beselected “on the fly”. Based upon this sample position scheme and thesample density of the region containing the triangle, rendering units150A-D determine which bins may contain samples located within thetriangle's boundaries (step 216). The offsets for the samples withinthese bins are then read from sample position memory 184 (step 218).Each sample's position is then calculated using the offsets and iscompared with the triangle's vertices to determine if the sample iswithin the triangle (step 220). Step 220 is discussed in greater detailbelow.

For each sample that is determined to be within the triangle, therendering unit draws the sample by calculating the sample's color, alphaand other attributes. This may involve lighting calculation andinterpolation based upon the color and texture map informationassociated with the vertices of the triangle. Once the sample isrendered, it may be forwarded to schedule unit 154, which then storesthe sample in sample buffer 162 (step 224).

Note the embodiment of the method described above is used forexplanatory purposes only and is not meant to be limiting. For example,in some embodiments the steps shown in the figure as occurring seriallymay be implemented in parallel. Furthermore, some steps may be reducedor eliminated in certain embodiments of the graphics system (e.g., steps204-206 in embodiments that do not implement geometry compression orsteps 210-212 in embodiments that do not implement a variable resolutionsuper-sampled sample buffer).

Determination of which Samples Reside within the Polygon being Rendered

The comparison may be performed in a number of different ways. In oneembodiment, the deltas between the three vertices defining the triangleare first determined. For example, these deltas may be taken in theorder of first to second vertex (v2−v1)=d12, second to third vertex(v3−v2)=d23, and third vertex back to the first vertex (v1−v3)=d31.These deltas form vectors, and each vector may be categorized asbelonging to one of the four quadrants of the coordinate plane (e.g., byusing the two sign bits of its delta X and Y coefficients). A thirdcondition may be added determining whether the vector is an X-majorvector or Y-major vector. This may be determined by calculating whetherabs(delta_x) is greater than abs(delta_y).

Using these three bits of information, the vectors may each becategorized as belonging to one of eight different regions of thecoordinate plane. If three bits are used to define these regions, thenthe X-sign bit (shifted left by two), the Y-sign bit (shifted left byone), and the X-major bit, may be used to create the eight regions asshown in FIG. 12A.

Next, three edge equations may be used to define the inside portion ofthe triangle. These edge equations (or half-plane equations) may bedefined using slope-intercept form. To reduce the numerical rangeneeded, both X-major and Y-major equation forms may be used (such thatthe absolute value of the slope value may be in the range of 0 to 1).Thus, the two edge equations are:X-major: y−m·x−b<0, when the point is below the lineY-major: x−m·y−b<0, when the point is to the left of the line

The X-major equations produces a negative versus positive value when thepoint in question is below the line, while the Y-major equation producesa negative versus positive value when the point in question is to theleft of the line. Since which side of the line is the “accept” side isknown, the sign bit (or the inverse of the sign bit) of the edgeequation result may be used to determine whether the sample is on the“accept” side or not. This is referred to herein as the “accept bit”.Thus, a sample is on the accept side of a line if:X-major: (y−m·x−b<0) <xor> acceptY-major: (x−m·y−b<0) <xor> accept

The accept bit may be calculated according to the following table,wherein cw designates whether the triangle is clockwise (cw=1) orcounter-clockwise (cw=0):

-   -   1: accept=!cw    -   0: accept=cw    -   4: accept=cw    -   5: accept=cw    -   7: accept=cw    -   6: accept=!cw    -   2: accept=!cw    -   3: accept=!cw

Tie breaking rules for this representation may also be implemented(e.g., coordinate axes may be defined as belonging to the positiveoctant). Similarly, X-major may be defined as owning all points that tieon the slopes.

In an alternate embodiment, the accept side of an edge may be determinedby applying the edge equation to the third vertex of the triangle (thevertex that is not one of the two vertices forming the edge). Thismethod may incur the additional cost of a multiply-add, which may not beused by the technique described above.

To determine the “faced-ness” of a triangle (i.e., whether the triangleis clockwise or counter-clockwise), the delta-directions of two edges ofthe triangle may be checked and the slopes of the two edges may becompared. For example, assuming that edge12 has a delta-direction of 1and the second edge (edge23) has a delta-direction of 0, 4, or 5, thenthe triangle is counter-clockwise. If, however, edge23 has adelta-direction of 3, 2, or 6, then the triangle is clockwise. If edge23has a delta-direction of 1 (i.e., the same as edge12), then comparingthe slopes of the two edges breaks the tie (both are x-major). If edge12has a greater slope, then the triangle is counter-clockwise. If edge23has a delta-direction of 7 (the exact opposite of edge12), then againthe slopes are compared, but with opposite results in terms of whetherthe triangle is clockwise or counter-clockwise.

The same analysis can be exhaustively applied to all combinations ofedge12 and edge23 delta-directions, in every case determining the properfaced-ness. If the slopes are the same in the tie case, then thetriangle is degenerate (i.e., with no interior area). It can beexplicitly tested for and culled, or, with proper numerical care, itcould be let through as it will cause no pixels to render. One specialcase is when a triangle splits the view plane, but that may be detectedearlier in the pipeline (e.g., when front plane and back plane clippingare performed).

Note in most cases only one side of a triangle is rendered. Thus, afterthe faced-ness of a triangle is determined, if the face is the one to berejected, then the triangle can be culled (i.e., subject to no furtherprocessing with no pixels generated). Further note that thisdetermination of faced-ness only uses one additional comparison (i.e.,of the slope of edge12 to that of edge23) beyond factors alreadycomputed. Many traditional approaches may utilize more complexcomputation (though at earlier stages of the set-up computation).

FIG. 13 is a flowchart of one embodiment of a method for filteringsamples stored in the super-sampled sample buffer to generate outputpixels. First, a stream of bins are read from the super-sampled samplebuffer (step 250). These may be stored in one or more caches to allowthe sample-to-pixel calculation units 170 easy access during theconvolution process (step 252). Next, the bins are examined to determinewhich may contain samples that contribute to the output pixel currentlybeing generated by the filter process (step 254). Each sample that is ina bin that may contribute to the output pixel is then individuallyexamined to determine if the sample does indeed contribute (steps256-258). This determination may be based upon the distance from thesample to the center of the output pixel being generated.

In one embodiment, the sample-to-pixel calculation units 170 may beconfigured to calculate this distance (i.e., the extent of the filter atsample's position) and then use it to index into a table storing filterweight values according to filter extent (step 260). In anotherembodiment, however, the potentially expensive calculation fordetermining the distance from the center of the pixel to the sample(which typically involves a square root function) is avoided by usingdistance squared to index into the table of filter weights.Alternatively, a function of x and y may be used in lieu of onedependent upon a distance calculation. In one embodiment, this may beaccomplished by utilizing a floating point format for the distance(e.g., four or five bits of mantissa and three bits of exponent),thereby allowing much of the accuracy to be maintained whilecompensating for the increased range in values. In one embodiment, thetable may be implemented in ROM. However, RAM tables may also be used.Advantageously, RAM tables may, in some embodiments, allow the graphicssystem to vary the filter coefficients on a per-frame basis. Forexample, the filter coefficients may be varied to compensate for knownshortcomings of the display or for the user's personal preferences. Thegraphics system can also vary the filter coefficients on a screen areabasis within a frame, or on a per-output pixel basis. Anotheralternative embodiment may actually calculate the desired filter weightsfor each sample using specialized hardware (e.g., multipliers andadders). The filter weight for samples outside the limits of theconvolution filter may simply be multiplied by a filter weight of zero(step 262), or they may be removed from the calculation entirely.

Once the filter weight for a sample has been determined, the sample maythen be multiplied by its filter weight (step 264). The weighted samplemay then be summed with a running total to determine the final outputpixel's color value (step 266). The filter weight may also be added to arunning total pixel filter weight (step 268), which is used to normalizethe filtered pixels. Normalization advantageously prevents the filteredpixels (e.g., pixels with more samples than other pixels) from appearingtoo bright or too dark by compensating for gain introduced by theconvolution process. After all the contributing samples have beenweighted and summed, the total pixel filter weight may be used to divideout the gain caused by the filtering (step 270). Finally, the normalizedoutput pixel may be output for gamma correction, digital-to-analogconversion (if necessary), and eventual display (step 274).

FIG. 14 illustrates a simplified example of an output pixel convolution.As the figure shows, four bins 288A-D contain samples that may possiblycontribute to the output pixel. In this example, the center of theoutput pixel is located at the boundary of bins 288A-288D. Each bincomprises sixteen samples, and an array of 2 four bins (2×2) is filteredto generate the output pixel. Assuming circular filters are used, thedistance of each sample from the pixel center determines which filtervalue will be applied to the sample. For example, sample 296 isrelatively close to the pixel center, and thus falls within the regionof the filter having a filter value of 8. Similarly, samples 294 and 292fall within the regions of the filter having filter values of 4 and 2,respectively. Sample 290, however, falls outside the maximum filterextent, and thus receives a filter value of 0. Thus, sample 290 will notcontribute to the output pixel's value. This type of filter ensures thatthe samples located the closest to the pixel center will contribute themost, while pixels located the far from the pixel center will contributeless to the final output pixel values. This type of filteringautomatically performs anti-aliasing by smoothing any abrupt changes inthe image (e.g., from a dark line to a light background). Anotherparticularly useful type of filter for anti-aliasing is a windowed sincfilter. Advantageously, the windowed sinc filter contains negative lobesthat re-sharpen some of the blended or “fuzzed” image. Negative lobesare areas where the filter causes the samples to subtract from the pixelbeing calculated. In contrast, samples on either side of the negativelobe add to the pixel being calculated.

Example values for samples 290-296 are illustrated in boxes 300-308. Inthis example, each sample comprises red, green, blue and alpha values,in addition to the sample's positional data. Block 310 illustrates thecalculation of each pixel component value for the non-normalized outputpixel. As block 310 indicates, potentially undesirable gain isintroduced into the final pixel values (i.e., an out pixel having a redcomponent value of 2000 is much higher than any of the sample's redcomponent values). As previously noted, the filter values may be summedto obtain normalization value 308. Normalization value 308 is used todivide out the unwanted gain from the output pixel. Block 312illustrates this process and the final normalized example pixel values.

The filter presented in FIG. 14 has been chosen for descriptive purposesonly and is not meant to be limiting. A wide variety of filters may beused for pixel value computations depending upon the desired filteringeffect(s). It is a well-known fact that the sinc filter realizes anideal band-pass filter. However, the sinc filter takes non-zero valuesover the whole of the X-Y plane. Thus, various windowed approximationsof the sinc filter have been developed. Some of these approximationssuch as the cone filter or Gaussian filter approximate only the centrallobe of the sinc filter, and thus, achieve a smoothing effect on thesampled image. Better approximations such as the Mitchell-Netravalifilter (including the Catmull-Rom filter as a special case) are obtainedby approximating some of the negative lobes and positive lobes thatsurround the central positive lobe of the sinc filter. The negativelobes allow a filter to more effectively retain spatial frequencies upto the cutoff frequency and reject spatial frequencies beyond the cutofffrequency. A negative lobe is a portion of a filter where the filtervalues are negative. Thus, some of the samples residing in the supportof a filter may be assigned negative filter values (i.e. filterweights).

A wide variety of filters may be used for the pixel value convolutionsincluding filters such as a box filter, a tent filter, a cylinderfilter, a cone filter, a Gaussian filter, a Catmull-Rom filter, aMitchell-Netravali filter, any windowed approximation of a sinc filter,etc. Furthermore, the support of the filters used for the pixel valueconvolutions may be circular, elliptical, rectangular (e.g. square),triangular, hexagonal, etc.

Full-Screen Anti-aliasing

The vast majority of current 3D graphics systems only provide real-timeanti-aliasing for lines and dots. While some systems also allow the edgeof a polygon to be “fuzzed”, this technique typically works best whenall polygons have been pre-sorted in depth. This may defeat the purposeof having general-purpose 3D rendering hardware for most applications(which do not depth pre-sort their polygons). In one embodiment,graphics system 112 may be configured to implement full-screenanti-aliasing by stochastically sampling up to sixteen samples peroutput pixel, filtered by a 5×5-convolution filter.

Variable Resolution Super-Sampling

Currently, the brute force method of utilizing a fixed number of samplesper pixel location, e.g., an 8× super-sampled sample buffer, wouldentail the use of eight times more memory, eight times the fill rate(i.e., memory bandwidth), and a convolution pipe capable of processingeight samples per pixel.

In one embodiment, graphics system 112 may be configured to overcomethese potential obstacles by implementing variable resolutionsuper-sampling. In this embodiment, graphics system 112 mimics the humaneye's characteristics by allocating a higher number of samples per pixelat one or more first locations on the screen (e.g., the point offoveation on the screen), with a drop-off in the number of samples perpixel for one or more second locations on the screen (e.g., areasfarther away from the point of foveation). Depending upon theimplementation, the point of foveation may be determined in a variety ofways. In one embodiment, the point of foveation may be a predeterminedarea around a certain object displayed upon the screen. For example, thearea around a moving cursor or the main character in a computer game maybe designated the point of foveation. In another embodiment, the pointof foveation on the screen may be determined by head-tracking oreye-tracking. Even if eye/head/hand-tracking, cursor-based, or maincharacter-based points of foveation are not implemented, the point offoveation may be fixed at the center of the screen, where the majorityof viewer's attention is focused the majority of the time. Variableresolution super-sampling is described in greater detail below.

Variable-Resolution Super-Sampled Sample Buffer—FIGS. 15-19

A traditional frame buffer is one rectangular array of uniformly sampledpixels. For every pixel on the final display device (CRT or LCD), thereis a single pixel or location of memory storage in the frame buffer(perhaps double buffered). There is a trivial one-to-one correspondencebetween the 2D memory address of a given pixel and its 2D sample addressfor the mathematics of rendering. Stated another way, in a traditionalframe buffer there is no separate notion of samples apart from thepixels themselves. The output pixels are stored in a traditional framebuffer in a row/column manner corresponding to how the pixels areprovided to the display during display refresh.

In a variable-resolution super-sampled sample buffer, the number ofcomputed samples per output pixel varies on a regional basis. Thus,output pixels in regions of greater interest are computed using agreater number of samples, thus producing greater resolution in thisregion, and output pixels in regions of lesser interest are computedusing a lesser number of samples, thus producing lesser resolution inthis region.

As previously noted, in some embodiments graphic system 112 may beconfigured with a variable resolution super-sampled sample buffer. Toimplement variable resolution super-sampling, sample buffer 162 may bedivided into smaller pieces, called regions. The size, location, andother attributes of these regions may be configured to vary dynamically,as parameterized by run-time registers on a per-frame basis.

Turning now to FIG. 15, a diagram of one possible scheme for dividingsample buffer 162 is shown. In this embodiment, sample buffer 162 isdivided into the following three nested regions: foveal region 354,medial region 352, and peripheral region 350. Each of these regions hasa rectangular shaped outer border, but the medial and the peripheralregions have a rectangular shaped hole in their center. Each region maybe configured with certain constant (per frame) properties, e.g., aconstant density sample density and a constant size of pixel bin. In oneembodiment, the total density range may be 256, i.e., a region couldsupport between one sample every 16 screen pixels (4×4) and 16 samplesfor every 1 screen pixel. In other embodiments, the total density rangemay be limited to other values, e.g., 64. In one embodiment, the sampledensity varies, either linearly or non-linearly, across a respectiveregion. Note in other embodiments the display may be divided into aplurality of constant sized regions (e.g., squares that are 4×4 pixelsin size or 40×40 pixels in size).

To simply perform calculations for polygons that encompass one or moreregion corners (e.g., a foveal region corner), the sample buffer may befurther divided into a plurality of subregions. Turning now to FIG. 16,one embodiment of sample buffer 162 divided into sub-regions is shown.Each of these sub-regions are rectangular, allowing graphics system 112to translate from a 2D address with a sub-region to a linear address insample buffer 162. Thus, in some embodiments each sub-region has amemory base address, indicating where storage for the pixels within thesub-region starts. Each sub-region may also have a “stride” parameterassociated with its width.

Another potential division of the super-sampled sample buffer iscircular. Turning now to FIG. 17, one such embodiment is illustrated.For example, each region may have two radii associated with it (i.e.,360-368), dividing the region into three concentric circular-regions.The circular-regions may all be centered at the same screen point, thefovea center point. Note however, that the fovea center-point need notalways be located at the center of the foveal region. In some instancesit may even be located off-screen (i.e., to the side of the visualdisplay surface of the display device). While the embodiment illustratedsupports up to seven distinct circular-regions, it is possible for someof the circles to be shared across two different regions, therebyreducing the distinct circular-regions to five or less.

The circular regions may delineate areas of constant sample densityactually used. For example, in the example illustrated in the figure,foveal region 354 may allocate a sample buffer density of 8 samples perscreen pixel, but outside the innermost circle 368, it may only use 4samples per pixel, and outside the next circle 366 it may only use twosamples per pixel. Thus, in this embodiment the rings need notnecessarily save actual memory (the regions do that), but they maypotentially save memory bandwidth into and out of the sample buffer (aswell as pixel convolution bandwidth). In addition to indicating adifferent effective sample density, the rings may also be used toindicate a different sample position scheme to be employed. Aspreviously noted, these sample position schemes may stored in an on-chipRAM/ROM, or in programmable memory.

As previously discussed, in some embodiments super-sampled sample buffer162 may be further divided into bins. For example, a bin may store asingle sample or an array of samples (e.g., 2×2 or 4×4 samples). In oneembodiment, each bin may store between one and sixteen sample points,although other configurations are possible and contemplated. Each regionmay be configured with a particular bin size, and a constant memorysample density as well. Note that the lower density regions need notnecessarily have larger bin sizes. In one embodiment, the regions (or atleast the inner regions) are exact integer multiples of the bin sizeenclosing the region. This may allow for more efficient utilization ofthe sample buffer in some embodiments.

Variable-resolution super-sampling involves calculating a variablenumber of samples for each pixel displayed on the display device.Certain areas of an image may benefit from a greater number of samples(e.g., near object edges), while other areas may not need extra samples(e.g., smooth areas having a constant color and brightness). To savememory and bandwidth, extra samples may be used only in areas that maybenefit from the increased resolution. For example, if part of thedisplay is colored a constant color of blue (e.g., as in a background),then extra samples may not be particularly useful because they will allsimply have the constant value (equal to the background color beingdisplayed). In contrast, if a second area on the screen is displaying a3D rendered object with complex textures and edges, the use ofadditional samples may be useful in avoiding certain artifacts such asaliasing. A number of different methods may be used to determine orpredict which areas of an image would benefit from higher sampledensities. For example, an edge analysis could be performed on the finalimage, and with that information being used to predict how the sampledensities should be distributed. The software application may also beable to indicate which areas of a frame should be allocated highersample densities.

A number of different methods may be used to implementvariable-resolution super sampling. These methods tend to fall into thefollowing two general categories: (1) those methods that concern thedraw or rendering process, and (2) those methods that concern theconvolution process. Rendering process methods include methods whichrender samples into sample buffer 162 with a variable sample density.For example, sample density may be varied on a per-region basis (e.g.,medial, foveal, and peripheral), or on a scan-line basis (or on a smallnumber of scan lines basis). Varying sample density on a scan-line basismay be accomplished by using a look-up table of densities. For example,the table may specify that the first five pixels of a particular scanline have three samples each, while the next four pixels have twosamples each, and so on. Convolution process methods include methodswhich filter samples based on a uniform convolution filter, acontinuously variable convolution filter, or a convolution filteroperating at multiple spatial frequencies.

A uniform convolve filter may, for example, have a constant extent (ornumber of samples selected) for each pixel calculated. In contrast, acontinuously variable convolution filter may gradually change the numberof samples used to calculate a pixel. The function may be varycontinuously from a maximum at the center of attention to a minimum inperipheral areas.

Different combinations of these methods (both on the rendering side andconvolution side) are also possible. For example, a constant sampledensity may be used on the rendering side, while a continuously variableconvolution filter may be used on the samples.

Different methods for determining which areas of the image will beallocated more samples per pixel are also contemplated. In oneembodiment, if the image on the screen has a main focal point (e.g., acharacter like Mario in a computer game), then more samples may becalculated for the area around Mario and fewer samples may be calculatedfor pixels in other areas (e.g., around the background or near the edgesof the screen).

In another embodiment, the viewer's point of foveation may be determinedby eye/head/hand-tracking. In head-tracking embodiments, the directionof the viewer's gaze is determined or estimated from the orientation ofthe viewer's head, which may be measured using a variety of mechanisms.For example, a helmet or visor worn by the viewer (with eye/headtracking) may be used alone or in combination with a hand-trackingmechanism, wand, or eye-tracking sensor to provide orientationinformation to graphics system 112. Other alternatives includehead-tracking using an infrared reflective dot placed on the user'sforehead, or using a pair of glasses with head- and or eye-trackingsensors built in. One method for using head- and hand-tracking isdisclosed in

-   -   U.S. Pat. No. 5,446,834 (entitled “Method and Apparatus for High        Resolution Virtual Reality Systems Using Head Tracked Display,”        by Michael Deering, issued Aug. 29, 1995),        which is incorporated herein by reference in its entirety. Other        methods for head tracking are also possible and contemplated        (e.g., infrared sensors, electromagnetic sensors, capacitive        sensors, video cameras, sonic and ultrasonic detectors, clothing        based sensors, video tracking devices, conductive ink, strain        gauges, force-feedback detectors, fiber optic sensors, pneumatic        sensors, magnetic tracking devices, and mechanical switches).

As previously noted, eye-tracking may be particularly advantageous whenused in conjunction with head-tracking. In eye-tracked embodiments, thedirection of the viewer's gaze is measured directly by detecting theorientation of the viewer's eyes in relation to the viewer's head. Thisinformation, when combined with other information regarding the positionand orientation of the viewer's head in relation to the display device,may allow an accurate measurement of viewer's point of foveation (orpoints of foveation if two eye-tracking sensors are used). One possiblemethod for eye tracking is disclosed in U.S. Pat. No. 5,638,176(entitled “Inexpensive Interferometric Eye Tracking System”). Othermethods for eye tracking are also possible and contemplated (e.g., themethods for head tracking listed above).

Regardless of which method is used, as the viewer's point of foveationchanges position, so does the distribution of samples. For example, ifthe viewer's gaze is focused on the upper left-hand corner of thescreen, the pixels corresponding to the upper left-hand corner of thescreen may each be allocated eight or sixteen samples, while the pixelsin the opposite corner (i.e., the lower right-hand corner of the screen)may be allocated only one or two samples per pixel. Once the viewer'sgaze changes, so does the allotment of samples per pixel. When theviewer's gaze moves to the lower right-hand corner of the screen, thepixels in the upper left-hand corner of the screen may be allocated onlyone or two samples per pixel. Thus, the number of samples per pixel maybe actively changed for different regions of the screen in relation theviewer's point of foveation. Note in some embodiments, multiple usersmay each have head/eye/hand tracking mechanisms that provide input tographics system 112. In these embodiments, there may conceivably be twoor more points of foveation on the screen, with corresponding areas ofhigh and low sample densities. As previously noted, these sampledensities may affect the render process only, the filter process only,or both processes.

Turning now to FIGS. 18A-B, one embodiment of a method for apportioningthe number of samples per pixel is shown. The method apportions thenumber of samples based on the location of the pixel relative to one ormore points of foveation. In FIG. 18A, an eye- or head-tracking device360 is used to determine the point of foveation 362 (i.e., the focalpoint of a viewer's gaze). This may be determined by using trackingdevice 360 to determine the direction that the viewer's eyes(represented as 364 in the figure) are facing. As the figureillustrates, in this embodiment, the pixels are divided into fovealregion 354 (which may be centered around the point of foveation 362),medial region 352, and peripheral region 350.

Three sample pixels are indicated in the figure. Sample pixel 374 islocated within foveal region 314. Assuming foveal region 314 isconfigured with bins having eight samples, and assuming the convolutionradius for each pixel touches four bins, then a maximum of 32 samplesmay contribute to each pixel. Sample pixel 372 is located within medialregion 352. Assuming medial region 352 is configured with bins havingfour samples, and assuming the convolution radius for each pixel touchesfour bins, then a maximum of 16 samples may contribute to each pixel.Sample pixel 370 is located within peripheral region 350. Assumingperipheral region 370 is configured with bins having one sample each,and assuming the convolution radius for each pixel touches one bin, thenthere is a one sample to pixel correlation for pixels in peripheralregion 350. Note these values are merely examples and a different numberof regions, samples per bin, and convolution radius may be used.

Turning now to FIG. 18B, the same example is shown, but with a differentpoint of foveation 362. As the figure illustrates, when tracking device360 detects a change in the position of point of foveation 362, itprovides input to the graphics system, which then adjusts the positionof foveal region 354 and medial region 352. In some embodiments, partsof some of the regions (e.g., medial region 352) may extend beyond theedge of display device 84. In this example, pixel 370 is now withinfoveal region 354, while pixels 372 and 374 are now within theperipheral region. Assuming the sample configuration as the example inFIG. 18A, a maximum of 32 samples may contribute to pixel 370, whileonly one sample will contribute to pixels 372 and 374. Advantageously,this configuration may allocate more samples for regions that are nearthe point of foveation (i.e., the focal point of the viewer's gaze).This may provide a more realistic image to the viewer without the needto calculate a large number of samples for every pixel on display device84.

Turning now to FIGS. 19A-B, another embodiment of a computer systemconfigured with a variable resolution super-sampled sample buffer isshown. In this embodiment, the center of the viewer's attention isdetermined by position of a main character 362. Medial and fovealregions are centered on main character 362 as it moves around thescreen. In some embodiments, the main character may be a simple cursor(e.g., as moved by keyboard input or by a mouse).

In still another embodiment, regions with higher sample density may becentered around the middle of display device 84's screen.Advantageously, this may require less control software and hardwarewhile still providing a shaper image in the center of the screen (wherethe viewer's attention may be focused the majority of the time).

Computer Network—FIG. 20

Referring now to FIG. 20, a computer network 500 is shown comprising atleast one server computer 502 and one or more client computers 506A-N.(In the embodiment shown in FIG. 4, client computers 506A-B aredepicted). One or more of the client systems may be configured similarlyto computer system 80, with each having one or more graphics systems 112as described above. Server 502 and client(s) 506 may be joined through avariety of connections 504, such as a local-area network (LAN), awide-area network (WAN), or an Internet connection. In one embodiment,server 502 may store and transmit 3-D geometry data (which may becompressed) to one or more of clients 506. The clients 506 receive thecompressed 3-D geometry data, decompress it (if necessary), and thenrender the geometry data. The rendered image is then displayed on theclient's display device. The clients render the geometry data anddisplay the image using super-sampled sample buffer and real-time filtertechniques described above. In another embodiment, the compressed 3-Dgeometry data may be transferred between client computers 506.

Dynamically Adjusting the Sample-to-Pixel Filter

The graphics system may be further operable to dynamically adjust thefilter used for generating output pixels in response to a subset of theoutput pixels having negative values. Pixels with negative values may begenerated, for example, as a result of using a filter with negativelobes.

In one set of embodiments, the graphics system may be configured toexamine the color values for pixels in a frame, and to compute a pixelnegativity value for each pixel having one or more negative colorvalues. For example, if any of the colors R, G, or B for a given pixelattains a negative value, the pixel negativity value for the given pixelmay be computed as (a) a sum of those color components (R, G and/or B)which achieve negative values, (b) an average of those color componentswhich achieve negative values, (c) the color component which achievesthe most negative value, or (d) any function of one or more of the colorcomponents which achieve negative values. The present inventioncontemplates a wide variety of methodologies for computing the pixelnegativity value based on the negative-valued color components of apixel.

A pixel is said to be “negative” when one or more of its colorcomponents are negative. A pixel is said to be “red negative” when itsred component is negative. A pixel is said to be “green negative” whenits green component is negative. A pixel is said to be “blue negative”when its blue component is negative. The process of scanning pixel colorvalues to determine negative pixels is referred to herein as negativepixel scanning. The negative pixel scanning may be performed on all thepixels in a frame, or a subset of the pixels in a frame. The pixelnegativity computation may be performed on those pixels determined to benegative by the negative pixel scanning.

In one embodiment, the negative pixel scanning and/or pixel negativitycomputation may be performed by one or more sample-to-pixel calculationunits. In another embodiment, the negative pixel scanning and/or pixelnegativity computation may be performed by a separate negativitycomputation unit (NCU) which receives the pixel data streams generatedby the one or more sample-to-pixel calculation units.

The above discussion of negative pixel scanning and the pixel negativitycomputation naturally generalizes to any desired color system, i.e., itis not necessary to use the RGB color system. In addition, a pixel mayinclude other attributes such as alpha which may attain a negativevalue. Thus, the negative pixel scanning and pixel negativitycomputation may be expanded to include additional pixel attributes.

Based on the pixel negativity values of the negative pixels, thegraphics system may compute a frame negativity value for the givenframe. The frame negativity value may be (1) a sum of the pixelnegativity values, (2) an average of the pixel negativity values, (3) astatistic computed on the population of pixel negativity values, or (4)the extreme of the pixel negativity values (i.e. the pixel negativityvalue which represents the most negative pixel), etc. For example, thegraphics system may generate a histogram of the pixel negativity valuesand operate on the histogram values (i.e. the population values) todetermine the frame negativity value. Thus, the frame negativity valuemeasures the amount of “negativity” present in a given frame. The framenegativity value may be computed for every frame or every N_(f) frames,where N_(f) is a positive integer.

It is noted that the graphics system may be configured for use withmonochrome displays. In other words, the graphics processor 90 may beconfigured to generate a single intensity value per sample. Thus,sample-to-pixel calculation units 170 may correspondingly generate asingle intensity value per pixel. In this case, the pixel negativityvalue may not require a special computation, i.e. the single intensityvalue, when it is negative, may be the pixel negativity value.

In some embodiments, a separate frame negativity value may be computedfor each color (or, more generally, for each pixel attribute). The red(green, blue) frame negativity value may be computed based on the red(green, blue) values of those pixels which are red (green, blue)negative. For example, the red frame negativity value may be computed as(1) a sum of the red values of the red negative pixels, (2) an averageof the red values of the red negative pixels, (3) a statistic computedon the population of red values of the red negative pixels, (4) theextreme of the red values of the red negative pixels, or (5) anyfunction of the red values of the red negative pixels. The per-colorframe negativity values may be computed by one or more of thesample-to-pixel calculation units or by the negativity computation unit.

In one set of embodiments, the per-color frame negativity values arecomputed based on corresponding histograms. For example, the red framenegativity value may be computed based on a histogram of the redcomponents of the red negative pixels. This histogram is referred as the“red histogram”. A weighted sum of the red histogram values maydetermine the red frame negativity value. Thus, the graphics system maygenerate a red histogram, a green histogram and a blue histogram for agiven frame, and compute each of the per-color frame negativity valuesfrom the corresponding histogram. The graphics system may compute theper-color histograms and frame negativity values for every frame or forevery N_(f) frames of video output where N_(f) is a positive integer.

In one set of embodiments, an average (or sum) of the pixel attributevalues (e.g. R, G and B) may be formed to determine whether a pixel isnegative. In this embodiment, the pixel is said to be “negative” whenthe attribute average is negative. Also, the pixel negativity value maybe defined as this attribute average.

As noted above, only a portion of the pixels in a frame may be subjectto the negative pixel scanning (i.e. examined to determinepositive/negative status). For example, only pixels within a certainwindow or pixels within a certain region of the screen may be examined.In addition, the graphics system may examine a certain subset of thepixels in the frame, for example, pixels on a grid (i.e. pixels at theintersections of vertical and horizontal grid lines), one out of everytwo pixels, every three pixels, or every N_(sc) pixels where N_(sc) is apositive integer. The graphics system may also examine random pixels.

FIG. 21 illustrates one embodiment of a pixel negativity histogram. Thehorizontal axis of the histogram represents pixel negativity percentage,i.e.|(pixel negativity)/(maximum pixel negativity)|=100.The maximum pixel negativity for a given filter may be achieved when theall samples in the negative-valued portions of the filter have maximallypositive color intensities, and all the samples in the positive-valuedportions of the filter have zero color intensities. The histogramcomprises a plurality of cells, each extending from a low negativitypercentage to a high negativity percentage. Each cell has acorresponding size value. The cell size represents the number of pixelswith negativity percentages between the cell's low and high percentageboundaries. For example, cell 600 has a cell size 604 that equals thenumber of pixels (or some function of the number of pixel) havingnegativity percentage between 0 and 10 percent.

FIG. 22 illustrates another embodiment of a histogram of pixelnegativity values with cells defined by intervals the form(−2^(n+1),−2^(n)] where index n varies from zero to an upper limit N_(L)which depends on the number of bits allocated to the pixel negativityvalue. In other words, the n^(th) cell of the histogram is defined asthe interval of pixel negativity values X given by the inequality−2^(n+1)<X≦−2^(n). The following table illustrates the pixel negativityranges for cells 1 through 5. The left and right pixel negativity limitsfor each cell are indicated in both decimal and 2s complement notation.

TABLE 1 Binary-Aligned Histogram Cells Cell Left Limit Right Limit #(non-inclusive) (inclusive) Width 1 −2 = 111110 −1 = 111111 1 2 −4 =111100 −2 = 111110 2 3 −8 = 111000 −4 = 111100 4 4 −16 = 110000  −8 =111000 8 5 −32 = 100000  −16 = 110000  16Because the limits of the cell ranges occur at powers of two, theassignment of each pixel negativity value to the cell range in which itresides may be performed with increased efficiency. (The mostsignificant one bit of |X|, i.e. the absolute value of the framenegativity value, determines the cell number.) While the embodiment ofFIG. 22 assumes that the pixel negativity value X is represented by asix-bit word in 2s complement form, the principles inherent in thisexample naturally generalize to any number of bits or any numericrepresentation scheme.

It is noted that the probability of achieving a pixel negativity value Xmay often be a decreasing function of |X|. Thus, it may be desirable todefine the cell ranges so the cell resolution decreases (i.e. so thatthe cell width increases) with increasing magnitude of the pixelnegativity. The cell ranges in the embodiment of FIG. 22 realize thisdesired property by having widths which are successive powers of two.More cells (higher resolution) are provided at low negative values, andfewer cells (coarser resolution) are provided at high negative values.

In some embodiments, a frame negativity value may be determined bycomputing a weighted average (or weighted sum) of the cell sizes. Thesize of a cell is typically the number of pixels (or pixel components)in the cell. The cell sizes corresponding to cells of low pixelnegativity may be weighted less than the cell sizes corresponding tocells of high pixel negativity. (Pixel negativity is said to be “low”when the absolute value of pixel negativity is small, and “high” whenthe absolute value of pixel negativity is large.) For example, referringback to FIG. 21, cell size 604 may be given less weight than cell size606. In the embodiment of FIG. 22, the size of cell n may be weighted by2^(−n), and thus, a weighted sum of the cells sizes corresponds to apopulation average.

The calculated frame negativity value may then be compared against anegativity threshold. In some embodiments, the negativity threshold maybe a user-adjustable value. For example, the user may adjust thethreshold through a graphical user interface that executes on host CPU102 and/or graphics system 112. In one embodiment, the user may changethe threshold via one or more physical controls (e.g. buttons, knobsand/or sliders) on or coupled to system unit 82, display device 84and/or graphics system 112.

In one set of embodiments, the graphics system may adjust thesample-to-pixel filter (e.g. the filter function and/or the filtersupport) in response to the frame negativity value of a current framebeing unacceptably large as defined by the negativity threshold. Thecurrent frame negativity value may be declared unacceptably large whenits magnitude (i.e. absolute value) is larger than the negativitythreshold. The filter is adjusted so as to reduce the frame negativityvalue of subsequent frames. The graphics system may include dedicatedcircuitry and/or a processor operable to execute program code forimplementing the filter adjustment(s). In one embodiment, the filteradjustment may be implemented by the negativity computation unit (NCU)external to the sample-to-pixel calculation units. For example, the NCUmay update one or more filter coefficient tables from which thesample-to-pixel calculation units derive their filter coefficientvalues.

Conversely, the graphics system may continue to use the current filterfor one or more subsequent frames if the current frame negativity valueis acceptably small, e.g., if the absolute value of the current framenegativity is smaller than the threshold value. It is noted that theframe negativity value has been described above as a non-positivequantity (i.e. typically negative in sign). However, in someembodiments, the frame negativity value may be a non-negative quantity.For example, the frame negativity value may be computed from a histogramof the absolute value of the pixel negativity values.

In some embodiments, any filter adjustments induced by the current framemay be applied to the filter used (by the sample-to-pixel calculationunits) in subsequent frames, i.e. the current frame is not affected. Inother embodiments, any filter adjustments induced by the current frameare applied to the filter used in frames after the first subsequentframe, second subsequent frame, etc.

FIG. 23A illustrates one embodiment of a truncated sinc filter plottedwith respect to radius from the filter center. FIG. 23B illustrates oneembodiment of a Catmull-Rom filter plotted with respect to radius fromthe filter center. Both filters are depicted with a maximum radius oftwo pixel units. If either filter were used to filter sample values, theresulting pixels may attain negative values due to the negative lobe inthe range of radii between 1 and 2 pixel units. FIG. 23C illustrates oneembodiment of a cubic B-spline filter. The cubic B-spline filter issimilar is shape to the Gaussian filter and has no negative lobes. Ifthis filter were used to filter sample values, the resulting pixelvalues may advantageously avoid the problem of attaining negativevalues. However, the resulting pixilated image may appear blurry.

It is noted that the Catmull-Rom and cubic B-spline filters are specialcase filters in the Mitchell-Netravali family of filters. TheMitchell-Netravali family of filters is parameterized by two parametersreferred to herein as B and C. Each parameter takes a value in theinterval [0,1]. Thus, the parameters space is a unit square. An orderedpair (B,C) which resides in the unit square defines a particular filterin the Mitchell-Netravali family. The Catmull-Rom filter corresponds tothe ordered pair (1/2). The cubic B-spline corresponds to the orderedpair (1,0). Please refer to “Principles of Digital Image Synthesis” byAndrew S. Glassner, ©1995, Morgan Kaufman Publishing, Volume 1, pages531-536 for a definition and discussion of the Mitchell-Netravalifamily. The parameter space may be partitioned into regions based on thefiltering effect of the corresponding filters as suggested by FIG. 23D.Filters in the neighborhood of the cubic B-spline (1,0) may have only asmall amount of energy in their negative lobes (if they have negativelobes at all). The frame negativity value resulting from use of suchfilters may be small or zero. Unfortunately, however, these filters mayproduce images that are unacceptably blurry to most viewers.

Filters in the neighborhood of the (0,1) filter in the parameter spacemay have a significant amount of energy in their negative lobes. Thus,the images generated by such filters may have an unacceptable amount ofringing (e.g. at the boundaries of objects), and the frame negativityvalues may have larger magnitudes. FIG. 23E illustrates the (0,1)Mitchell-Netravali filter.

Another neighborhood in the parameter space may give filters whichgenerate satisfactory images (i.e. images which appear satisfactory onaverage to most viewers). However, even within the satisfactoryneighborhood of the parameter space, there may be variations insharpness versus blurriness, ringing versus non-ringing, etc. Filtersalong the parameter curve 2C+B=1 are generally satisfactory filters.

In some embodiments, the sample-to-pixel filter may be changed inresponse to the magnitude of the frame negativity value being above thenegativity threshold. For example, the current filter may be replacedwith a filter having less energy in the negative lobe(s) or no negativelobes at all. Succeeding frames generated with the new filter shouldhave frame negativity values with smaller magnitude due to the reducednegative lobes of the new filter. The graphics system may applyadjustments to the sample-to-pixel filter as long as the magnitude ofthe frame negativity value exceeds the threshold. Furthermore, thegraphics system may apply a control strategy which measures the amountdeltaX by which the frame negativity exceeds threshold, and determines anew filter (or filter adjustment) based on the amount deltaX, anumerical derivative of deltaX, a numerical integration of deltaX, adiscrete-time filtration of deltaX, or some combination thereof.

In one embodiment, the graphics system (e.g. a sample-to-pixelcalculation unit or the negativity computation unit) may add a positiveconstant to the filter function to shift the filter function upwards inresponse to the frame negativity exceeding the negativity threshold. Theupward shifted filter function has less energy in its negative lobe(s).FIG. 24 illustrates a truncated sinc function which has been shiftedupward so that its absolute minimum rests on the horizontal axis, andthus, the negative lobes of the truncated sinc have been completelyeliminated. The amount of the upward shift (or delta shift) may dependon the amount by which the frame negativity exceeds threshold. Thefilter function may be represented in graphics system 112 by a table offilter coefficients indexed by radius (or radius squared). Thus, theupward shift in the filter function may be realized by adding a positiveconstant to the tabulated filter coefficients. In another embodiment,instead of shifting the filter function upwards, the graphics system mayreplace the current filter with a filter such as a truncated Gaussianfilter which has no negative lobes, and restore the original filterhaving negative lobes after the frame negativity has dropped belowthreshold. In a third embodiment, the graphics system may adjust thecurrent filter in the direction of decreasing negative lobe energywithin a family of filters (such as the Mitchell-Netravali family) inresponse to the frame negativity exceeding threshold.

As used herein, the negative lobe energy of a filter may be defined asthe negation of the sum of the negative coefficients of the filter, orequivalently, as the sum of the absolute values of the negativecoefficients of the filter.

In some embodiments, the graphics system may maintain an upper and lowernegativity threshold, and may invoke adjustments of the sample-to-pixelfilter when the frame negativity strays outside the interval bounded bythe lower and upper thresholds. The control adjustments seek to drivethe frame negativity back towards the threshold which has been violated,i.e. back towards the interior of the interval.

FIG. 25 illustrates one embodiment of graphics system 112 which isconfigured to implement dynamic filter adjustments based on the framenegativity values. The graphics system includes graphics processor 90,sample buffer 162, one or more sample-to-pixel calculation units 170,negativity computation unit 180 and filter memory 185. Graphicsprocessor 90 may render samples in response to a stream of receivedgraphics data. The rendered samples may be stored in sample buffer 162.The one or more sample-to-pixel calculation units 170 may read samplesfrom sample buffer 162, and filter the samples to generate a stream ofoutput pixels. The stream of output pixels may be passed to a displaydevice for presentation to a user/viewer. In addition, the stream ofoutput pixels may be passed to negativity computation unit 180 forcomputation of a frame negativity value for the current frame. Inresponse to the frame negativity value being larger in magnitude than anegativity threshold, the negativity computation unit 180 may implementa filter adjustment by modifying the values in filter memory 185. Filtermemory 185 may store computed values of the filter function at a fixedset of radius values. Alternatively, filter memory 185 may store a setof parameters from which values of the filter function may be readilycomputed.

The sample-to-pixel calculation units 170 may read the filter valuesand/or filter parameters from the filter memory 185, and use the filtervalues and/or parameters to perform the sample-to-pixel filtering. Inone embodiment, each of the sample-to-pixel calculation units has adedicated filter memory. Thus, the negativity computation unit 180 mayupdate some or all of the dedicated filter memories.

FIG. 26 is a flowchart describing one embodiment of a method foradjusting the filter. In step 622, one or more sample-to-pixelcalculation units may read samples from sample buffer 162. Eachsample-to-pixel calculation unit may receive a corresponding stream ofsamples from sample buffer 162, and may filter the samples of thecorresponding stream to generate output pixels as indicated in step 624.The filter used by the sample-to-pixel calculation units may be definedby the filter values and/or filter parameters stored in filter memory185. Filter values and/or filter parameters for a default filter havingone or more negative lobes may be initially stored in filter memory 185.The output pixels generated by each sample-to-pixel calculation unit maybe integrated into an output pixel stream as suggested by FIG. 25. Theoutput pixel stream is transmitted to one or more display devices. Insome embodiments, the operations of (a) reading samples from samplebuffer 162 and (b) filtering the samples to generate output pixels areperformed concurrently. Graphics processor 90 may continuously updatesample buffer 162 with rendered samples in response to a received streamof graphics data (e.g. triangle data). Similarly, sample-to-pixelcalculation units 170 may continuously read bins of sample dataaccording to a raster scan pattern (or approximately a raster scanpattern) from sample buffer 162, and may filter the sample data togenerate output pixels, for one frame after another.

In step 628, the graphics system (e.g. negativity computation unit 180)may receive the output pixel stream and compute a frame negativity valuefor the current frame. It is noted that the computation of the framenegativity may be initiated as soon as the first pixels of the currentframe become available.

In step 630, the graphics system (e.g. the negativity computation unit180) may compare the frame negativity value of the current frame to thethreshold value. If the frame negativity value is larger in magnitudethan the threshold value, step 632 may be performed. In step 632, thegraphics system may adjust the filter so that the frame negativityvalues of future frames may be reduced in magnitude. In someembodiments, the amount of the filter adjustment may depend on theamount by which the frame negative value exceeds the threshold inmagnitude. In other embodiments, the graphics system may incorporateinformation about the rate of change of the frame negativity value andthe past history of the frame negativity value (in previous frames) todetermine the filter adjustment.

Filter adjustments may be realized by updating the filter values and/orparameters stored in filter memory 185. For example, negativitycomputation unit 180 may compute filter values for the adjusted filterat the fixed set of radii, or may compute adjusted values of theMitchell-Netravali parameters B and C, and store these filtervalues/parameters in filter memory 185. In one set of embodiments, thefilter memory 185 may be updated before the start of the next frame sothat the sample-to-pixel calculation units 170 may use the updatedfilter for the output pixel computations of the next frame. After thefilter has been adjusted, the computation of the frame negativity value(i.e. step 628) may be initiated for the next frame as soon as theoutput pixel data for the next frame is available.

If, in the comparison of step 630, the frame negativity value isdetermined to be smaller in magnitude than the threshold value, thefilter adjustment may be bypassed. Thus, the same filter, as defined bythe contents of filter memory 185, may be used in the next frame.

It is noted that a wide variety of filter adjustments are contemplated.For example, the filter function may be (a) shifted up by the additionof a constant, (b) morphed in the direction of decreasing negative lobeenergy in a parameterized family of filters, (c) replaced with a filterof a different type having little or no negative lobes, (d) modified byclamping the negative coefficients (i.e. coefficients in the negativelobes) of the current filter to zero, (e) modified by attenuating thenegative coefficients of the current filter (i.e. by moving them closerto zero), or (f) any combination of the preceding operations. After theframe negativity is reduced in magnitude to a value below the threshold,filters having increased negative lobe energy may be used once again.For example, an original default filter may be restored once the framenegativity magnitude drops below threshold.

In one set of embodiments, the graphics system is configured to use aseparate filter for each color. Thus, a red filter function may be usedto filter the red components of samples, a green filter function may beused to filter the green components of samples, and a blue filterfunction may be used to filter the blue components of samples. Asdescribed above, the graphics system may compute a frame negativityvalue for each color. The filter function (and/or support) for eachcolor may be adjusted based on the corresponding color frame negativityvalue. FIG. 26 may be interpreted as a method for adjusting any of thecolor filters in response to the corresponding color frame negativityvalue.

FIG. 27 shows one embodiment of a computer system 80 comprising systemunit 82, display device 84, keyboard 86, and pointing device 88. User700 is operating computer system 80 and is viewing display 84. In oneembodiment, the graphics system 112 may initially use a default filterfor generating output pixels from the rendered samples. User 700 maythen adjust the filter according to his/her personal preferences withrespect to the quality of the image. The user may dynamically adjust thefilter by manipulating controls 704 located on filter-control interface702. The filter adjustments may be implemented in real-time, and thus,the user may immediately observe the effects of his/her controladjustments on the displayed image quality.

While filter-control interface 702 is depicted as having three controls,in other embodiments, the filter-control interface may comprise agreater or lesser number of controls. In addition, controls 704 areintended to represent any desired combination of controls such as knobs,buttons, sliders, joysticks and balls. Filter-control interface 702 maybe an external physical device as suggested by FIG. 27. In this case,filter-control interface 702 may couple to an input port on graphicssystem 112 or device port on system unit 82.

In another embodiment, filter-control interface 702 may be implementedin software through which the user may be able to control the filterproperties (e.g., in an operating system or windows system orapplication control panel). For example, host CPU 102 may executeprogram code which supports a graphical filter-control interface. Inthis embodiment, controls 704 are realized by graphical controls, and anexternal (i.e. physical) filter-control interface may not be needed. Inother embodiments, the functionality of the filter control interface maybe implemented as a combination of physical device interface andsoftware interface.

The graphics system may be configured to control several properties ofthe sample-to-pixel filter, and more generally, properties of thefiltering process that generates the output pixels from the renderedsamples, in response to adjustments of controls 704. In one embodiment,one or more of the controls 704 enable a user to select a filter type.Examples of filter types that a user may be able to select include: abox filter, a tent filter, a cylindrical filter, a cone filter, atruncated Gaussian filter, a Catmull-Rom filter (or more generally, aMitchell-Netravali filter), a windowed Sinc filter and a cubic spline.

Additionally, one or more of the controls may be configured to controlmovement of the current filter along (or within) a one, two orN-parameter family of filters. For example, having selected theMitchell-Netravali family as the filter type, the user 700 maymanipulate one or more of controls 704 to slide along the B and Cparameter directions of the Mitchell-Netravali parameter space, or oneof controls 704 to slide along the curve 2C+B=1 in theMitchell-Netravali parameter space. In one embodiment, an image of aparameter space (e.g. the Mitchell-Netravali parameter square assuggested by FIG. 23D) may be displayed on the screen in a configurationmode, and the user may drag a superimposed selection cursor (orcross-hairs) to a desired location in the parameter space. The locationof the selection point determines the parameters of the filter to beused by the sample-to-pixel calculation units. The graphics system mayimplement the filter adjustments in response to displacements of theselection point in real-time. Thus, the user may immediately observe theeffects of his/her parameter displacements on the output video quality.

In some embodiments, the user 700 may define an arbitrary N-parameterfamily by selecting filter functions which realize the extremes of thefamily in each parameter direction and/or by supplying one or morefunctional expressions defining the family.

Some of the controls may enable a user to control the geometry andextent of the filter support, i.e., the shape and size of the supportarea about the filter center. The filter support defines the sampleswhich are included in the filtering process. In one embodiment, onecontrol may be used to select the shape of the support area. Examples ofsupport area shapes a user may be able to select are: a triangle, arectangle, a hexagon, a circle, etc. Another control (or controls) maybe used to control the extent of the filter support. A radial supportcontrol may be used for adjusting the radius of the filter support. Ahorizontal support control may be used for adjusting the extent of thefilter support in the horizontal direction, and a vertical supportcontrol may be used for adjusting the extent of the filter support inthe vertical direction. In the cases, for example, where the selectedfilter has a circular support, the horizontal control may be used toexpand or contract the filter support in the horizontal direction, andthe vertical control may be used to expand or contract the filtersupport in the vertical direction, thus enabling the user to change thefilter support from a circle to an ellipse which is more elongated inthe vertical or horizontal directions. Similarly, a user may be able toexpand or contract a rectangular support in the vertical or horizontaldirections.

Other controls may be used to translate the filter function up or down,and/or, to expand or contract the filter function in the radial,horizontal and/or vertical directions of screen space.

In another embodiment, the user may be able to change the filter (e.g.filter type, filter function, filter support geometry and filter supportextent) on a per region basis. For example, a background scene may bemore appropriately displayed using a softer filter than the foregroundof the scene. Filter-control interface 702 may allow the user to firstspecify a region on the display and then make filter adjustmentsspecific to that region.

Different users may have different preferences as to the quality of animage. Certain users may prefer, for example, an image that is sharper,whereas other users may prefer an image that is softer (i.e. moresmoothed). Thus, one of the controls 704 may be a sharpness/smoothnesscontrol whereby the user 700 may adjust the amount of smoothing toapplied in the sample filtering. In other words, thesharpness/smoothness control may induce the morphing of thesample-to-pixel filter in the direction of increased smoothing orincreased acuity within a parameterized family of filters.

Furthermore, different displays may have different responses to the samepixel values. For example, a CRT typically has a Gaussian intensitydistribution about each pixel, while an LCD typically has a squareintensity distribution with a sharp cut-off in intensity about eachpixel. Such differences may be especially apparent when different typesof displays (or projectors) are used in a multi-display system. In someembodiments, graphics system 112 may use a different filter for eachdisplay, and filter control interface 702 may be configured to allowfilter control adjustments per display (and/or per projector). Bymanipulating controls 704, the user 700 may be able to reconcile theappearance between multiple display devices. For example, user 700 mayspecify more smoothing for an LCD display, and less smoothing for a CRTdisplay, so that the displayed video on each display may look moreconsistent. Alternatively, graphics system 112 may automatically applythe multi-display image reconciliation by selecting appropriate filtersfor each display based on knowledge of the characteristics of eachdisplay. The user (or system configuration personnel) may entercharacterizing information for each display such as display type,manufacturer and/or model number.

Furthermore, the user 700 may not be satisfied with the nominalappearance of the video output from a given display, and thus, may beinterested in compensating the undesirable display-related effects onthe video output from the given display, or in making the video outputof the given display emulate (or more closely resemble) the typicalappearance of another display (or display type). Thus, filter controlinterface 702 may include one or more controls to perform displaycompensation and/or display emulation.

In some embodiments, the host CPU 102 may support a graphical userinterface (GUI) through which the user may open, close and manipulatedisplay windows on one or more screens. Graphics processor 90 mayreceive independent streams of graphics data for each window, and mayrender samples for each window into sample buffer 162. Each samplewritten into sample buffer 162 may be tagged with a window ID of thewindow to which it belongs. Sample-to-pixel calculation units 170 mayoperate on each window's samples using a different filter. Thus, filtermemory 185 may have sufficient storage to support multiple filter datarecords, one record for each active window. Each filter data recordspecifies the filter values and/or filter parameter which define thefilter to be used on the corresponding window. Thus, in addition tocontrol inputs which specify a filter or filter adjustment, filtercontrol unit 187 may receive a window indicator (e.g. a window ID)defining the window to which the control inputs pertain. The filtercontrol interface 702 may be part of the graphical user interface (GUI).

FIG. 28 illustrates one embodiment of graphics system 112 which isconfigured to implement dynamic filter adjustments in response tocontrol inputs provided by the user through the filter control interface702. Graphics system 112 includes graphics processor 90, sample buffer162, one or more sample-to-pixel calculation units 170, filter controlunit 187 and filter memory 185. Graphics processor 90 may render samplesin response to a stream of received graphics data. The rendered samplesmay be stored in sample buffer 162. Each of the sample-to-pixelcalculation units 170 may read samples from sample buffer 162, andfilter the received samples to generate output pixels. The output pixelsgenerated by each sample-to-pixel calculation unit may be integratedinto an output pixel stream and passed to a display device forpresentation to a user. Filter control unit 187 receives user controlinputs from filter control interface 702. In the case where filtercontrol interface 702 is a graphical interface, filter control unit 187may receive user control inputs from the operating system (executing onhost computer 102) via system bus 104.

Filter control unit 187 may implement filter adjustments consistent withthe user control inputs. Filter control unit 187 may perform anynecessary computations to determine an adjusted set of filter valuesand/or filter parameters in response to the user control inputs, and maystore the adjusted set of filter values and/or filter parameters infilter memory 185. The set of filter values and/or filter parametersstored in filter memory 185 determine the filter (i.e. the filterfunction and/or filter support) used by the sample-to-pixel calculationunits. In other words, the sample-to-pixel calculation units may readthe filter values and/or filter parameters from filter memory 185 todetermine the geometry and extent of the filter support and to computethe filter weight for each sample falling in the filter support. Forexample, filter memory 185 may store values of the filter functionevaluated at a set of radii spanning the interval from zero up to themaximum filter radius. In one embodiment, each of the sample-to-pixelcalculation units has a dedicated filter memory. Thus, filter controlunit 187 may update some or all of the dedicated filter memories inresponse to the user control inputs.

FIG. 29 shows a flowchart describing one embodiment of a method foradjusting the filter in response to user control input(s). In step 752,the one or more sample-to-pixel calculation units 170 may read samplesfrom sample buffer 162. Each sample-to-pixel calculation unit mayreceive a corresponding stream of samples from sample buffer 162, andmay filter the samples of the corresponding stream to generate outputpixels as indicated in step 754. The filter used by the sample-to-pixelcalculation units may be defined by the filter values and/or filterparameters stored in filter memory 185. Filter values and/or filterparameters for a default filter may be initially stored in filter memory185. The output pixels generated by each sample-to-pixel calculationunit may be integrated into an output pixel stream as suggested by FIG.28. The output pixel stream is transmitted to one or more displaydevices. In some embodiments, the operations of (a) reading samples fromsample buffer 162 and (b) filtering the samples to generate outputpixels are performed concurrently. Graphics processor 90 maycontinuously update sample buffer 162 with rendered samples in responseto a received stream of graphics data (e.g. triangle data). Similarly,sample-to-pixel calculation units 170 may continuously read bins ofsample data according to a raster scan pattern (or a distorted rasterscan pattern) from sample buffer 162, and may filter the sample data togenerate output pixels, for one frame after another.

In step 760, the filter control unit 187 may wait for control inputsasserted by the user 700 through filter control interface 702. Inresponse to receiving user control input(s), filter control unit 187 mayperform step 762. In step 762, filter control unit 187 may computefilter values and/or filter parameters for an adjusted filter consistentwith the user control inputs, and store these values/parameters infilter memory 185. After the filter memory 185 is updated, filtercontrol unit 762 may return to wait state 760, and the sample-to-pixelcalculation units 170 may filter pixels in succeeding frames with theadjusted filter.

In some embodiments, the filter-control interface 702 may be configuredfor a multi-user environment. Thus, filter control interface 702 or hostCPU 102 may store the filter configuration data that each user developsin a graphics session, and may restore the filter configuration datawhen the user returns for a future graphics session. For example, in oneembodiment, in a sign-on procedure, the user may enter informationidentifying himself/herself to the system, e.g. a username, passwordand/or ID number. In another embodiment, the user may simply selecthis/her ID) number using an ID selection control of the filter controlinterface 702. Host CPU 102 or graphics system 112 may then restore theuser's filter configuration data from memory.

In one set of embodiments, the graphics system is configured to use aseparate filter for each color. In other words, a red filter may be usedto filter the red components of samples, a green filter may be used tofilter the green components of samples, and a blue filter may be used tofilter the blue components of samples. Thus, the filter controlinterface 702 and graphics system 112 may allow the user toindependently change/adjust each of the per-color filters. For example,the user may select a color, adjust parameters of the filter functionand/or filter support for the corresponding color filter, select anothercolor, and so on.

In another embodiment, the graphics system may be operable todynamically adjust the sample-to-pixel filter (e.g. the filter functionand/or filter support) in response to measurements obtained by adisplay-monitoring system that is connected to the graphics system. Anexample of a display-monitoring system is camera 765 shown in FIG. 30.Camera 765 is focused on display 84 (or some portion thereof) in orderto capture the sequence of image frames that are presented on display84. In one embodiment, camera 765 may be a digital camera able tocapture and output the displayed image frames in digital format to thegraphics system. For example, the camera may be configured to output aplurality of captured pixels. In an embodiment where camera 765 is ananalog camera, an analog-to-digital converter (ADC) may be used toconvert the camera output signal to digital format in order to obtainthe captured pixels. In another embodiment, the graphics system mayperform the conversion of the camera output signal from analog todigital. Camera 765 preferably captures images at a resolution that isequal to or higher than the resolution of display 84. Furthermore,camera 765 may capture images at a frames/second rate that is equal tothe refresh rate of display 84. In another embodiment, the refresh rateof display 84 may be an integer multiple of the frames/second rate atwhich camera 765 may be able to capture images. In another embodiment,camera 765 may capture images at a frames/second rate that is an integermultiple of the refresh rate of display 84. In one embodiment, camera765 receives synchronization information from the graphics system inorder to remain synchronized with the images displayed on display 84.

The image captured by camera 765 contains information on how thesample-to-pixel filter has affected the displayed image. In addition,the captured image contains information on how display 84 has affectedthe color intensity distribution of the displayed output pixels. Asmentioned before, an LCD displays each pixel with a relatively squaredistribution in color intensity, whereas a CRT displays each pixel witha Gaussian distribution. Therefore, such a display monitoring system maybe used to dynamically adjust the sample-to-pixel filter (e.g. thefilter function and/or filter support) such that an image may appear thesame or close to the same on different types of displays.

The graphics system may receive a succession of captured image frames inthe form of captured pixels from the display monitoring device 765. Thegraphics system may compute a sharpness value for each of the capturedframes. The graphics system may also compute a sharpness value for everyother frame, every two frames, etc. in cases where the computationalpower is limited. The sample-to-pixel calculation unit may compute thesharpness value internally or the computation of the sharpness value maybe computed by a sharpness-computation unit or by the host CPU.

In one embodiment, the graphics system may be configured to output atest image (or a series of test images) to display 84. The test imagemay have, for example, a pre-determined sharpness value to assist in the“tuning” of the sample-to-pixel filter for a given display. The graphicssystem may perform a comparison of the parameters of the captured imageto the parameters of the displayed test image and then accordinglyadjust parameters of the sample-to-pixel filter.

The test image may have a neighborhood in which all display pixels areturned off except for a single central pixel which is turned on. Thecamera may capture the neighborhood at high resolution. Thus, thecaptured pixels may characterize the display's intensity distributionfor the single pixel. A sharpness value may be computed from an analysisof the captured pixels.

In another embodiment, the graphics system may compute the sharpnessvalue of each frame by examining the spatial frequency spectrum (e.g. anFFT or DCT) of the captured image. The amount of energy in the frequencyspectrum at high spatial frequencies is an indicator of the sharpness ofa displayed image.

The graphics system is further configured to compare the sharpness valueto a desired sharpness value. In response to the sharpness value beingabove or below the desired value, the graphics system may dynamicallyadjust the sample-to-pixel filter (e.g. the filter function and/or thefilter support) in order to maintain the sharpness value within acertain percentage of the desired value. For example, the graphicssystem may adjust the filter by (a) choosing a different type of filter,(b) adjusting parameters of the filter within a parameterized family offilters (such as the Mitchell-Netravali family), (c) expanding orcontracting the width of the filter function along the radial direction,the x direction and/or the y direction, or (d) raising or lowering thecoefficients of the filter function. In addition, the graphics systemmay change the filter support, e.g. by extending or contracting thefilter support in the x direction, the y direction and/or the radialdirection. The desired sharpness value may be a user-adjustableparameter.

In another embodiment, the graphics system may be configured to computea similarity value by comparing the set of captured pixels provided bythe display-monitoring device to the output pixels generated by thesample-to-pixel calculation units. The similarity value may be computedby the sample-to-pixel calculation units or by a similarity computationunit. The similarity value may range, for example, from 0 to 1, whereinthe similarity value is 0 for two completely dissimilar images and 1 fortwo identical images. Existing image-comparison algorithms may be usedto compare the two images and compute the similarity value.

The graphics system may be further configured to compare the similarityvalue to a minimum similarity value. In response to the similarity valuebeing below the minimum similarity value, the graphics system maydynamically change or adjust the sample-to-pixel filter (e.g. parametersof the filter function and/or the filter support) in order to maintainthe similarity value above the minimum value. For example, the graphicssystem may adjust the filter parameters within a parameterized filterfamily in a direction known to induce increased similarity orreconstruction accuracy. In addition, the graphics system may expand orcontract the filter function and/or the filter support in the radial,horizontal, and/or vertical screen space directions. In one embodiment,the graphics system may replace the current filter with a different typeof filter which is known to induce increased similarity. The minimumsimilarity value may be adjustable by the user/viewer.

FIG. 31 shows a flowchart describing a method for adjusting the filteraccording to one embodiment. In step 772, the one or moresample-to-pixel calculation units 170 may read samples for a currentframe from the sample buffer 162. In step 774, the sample-to-pixelcalculation units may operate on the samples with the filter determinedby filter memory 185 to generate a plurality of output pixels for thecurrent frame. Steps 772 and 774 may operate concurrently in a pipelinedfashion, i.e. the sample-to-pixel calculation units may continuouslyread and filter samples for one frame after another. In step 776, adisplay device receives and displays the output pixels. In step 778, adisplay-monitoring device captures the image displayed by the displaydevice.

In step 780, the similarity computation unit within the graphics systemmay compute a similarity value for the captured image with respect tothe output pixels of the current frame. In step 782, the graphics systemdetermines if the similarity value is larger than a minimum similarityvalue. If the similarity value is greater than the minimum similarityvalue, the filter remains unchanged for the filtering of subsequentframes. If the similarity value is less than the minimum similarityvalue, in step 790, the graphics system adjusts the sample-to-pixelfilter (e.g. the filter function and/or the filter support) in order toincrease the similarity of a subsequent captured image with respect tothe corresponding frame of output pixels. After adjusting thesample-to-pixel filter (or perhaps, while adjusting the sample-to-pixelfilter), step 778 may be initiated for the next displayed frame.

Although the embodiments above have been described in considerabledetail, other versions are possible. Numerous variations andmodifications will become apparent to those skilled in the art once theabove disclosure is fully appreciated. It is intended that the followingclaims be interpreted to embrace all such variations and modifications.Note that the headings used herein are for organizational purposes onlyand are not meant to limit the description provided herein or the claimsattached hereto.

1. A method for generating pixels for a display device, the methodcomprising: receiving graphics data; rendering a first plurality ofsamples for a frame in response to said graphics data; filtering saidfirst plurality of samples using a first filter to generate a first setof output pixels for said frame; computing a first negativity valuebased on said first set of output pixels, wherein said first negativityvalue measures an amount of negativity in said frame; and adjusting saidfirst filter in response to said first negativity value.
 2. The methodof claim 1, wherein said adjusting said first filter is performed inresponse to a magnitude of the first negative value exceeding anegativity threshold.
 3. The method of claim 2, wherein said negativitythreshold is adjustable by a user.
 4. The method of claim 1, whereinsaid computing the first negativity value comprises: identifyingnegative pixels at least a subset of said first set of output pixels,wherein negative pixels are output pixels having one or more negativepixel components; computing a pixel negativity value for each negativepixel in said at least a subset; operating on the pixel negativityvalues to determine the first negativity value.
 5. The method of claim 4wherein said operating comprises summing the pixel negativity values toobtain the first negativity value.
 6. The method of claim 4 wherein saidoperating comprises computing a statistic on the pixel negativityvalues.
 7. The method of claim 1, wherein said filtering comprises (a)filtering a first attribute of said first plurality of samples with thefirst filter to generate a first component of the output pixels of thefirst set, and (b) filtering a second attribute of said first pluralityof samples with a second filter to generate a second component of theoutput pixels of the first set; wherein the first negativity value isbased on the first component of the first set of output pixels; themethod further comprising: computing a second negativity value based onthe second component of the output pixels of the first set; andadjusting the second filter in response to said second negativity value.8. The method of claim 7, where the first attribute and second attributeare selected from the group consisting of red, green, blue, and alpha.9. The method of claim 1, further comprising: rendering a secondplurality of samples for a next frame in response to additional graphicsdata; and filtering said second plurality of samples using said adjustedfilter.
 10. The method of claim 1, wherein said computing saidnegativity value comprises: computing pixel negativity values for outputpixels of the first set having one or more negative components; forminga histogram of said pixel negativity values; and computing a statisticbased on the histogram cell values.
 11. The method of claim 10, whereinsaid histogram has cell boundaries which occur at successive powers oftwo.
 12. The method of claim 10, wherein said statistic comprises aweighted average of the histogram cell values.
 13. The method of claim1, wherein said adjusting comprises selecting a new filter comprisingless negative lobe energy than said first filter.
 14. The method ofclaim 1, wherein said adjusting comprises changing parameters of thefirst filter within a parameterized family of filters in a direction ofdecreasing negative lobe energy.
 15. The method of claim 1 furthercomprising transmitting the first set of output pixels to a displaydevice.
 16. A computer-readable memory medium comprising a plurality ofinstructions, wherein the instructions are configured to: receivegraphics data; render a first plurality of samples for a frame inresponse to said graphics data; filter said first plurality of samplesusing a first filter to generate a first set of output pixels for saidframe; compute a first negativity value based on said first set ofoutput pixels, wherein said first negativity value measures an amount ofnegativity in said frame; and adjust said first filter in response tosaid first negativity value.
 17. The memory medium of claim 16, whereinsaid adjusting said first filter is performed in response to a magnitudeof the first negative value exceeding a negativity threshold.
 18. Thememory medium of claim 17, wherein said negativity threshold isadjustable by a user.
 19. The memory medium of claim 16, wherein saidcomputing the first negativity value comprises: identifying negativepixels at least a subset of said first set of output pixels, whereinnegative pixels are output pixels having one or more negative pixelcomponents; computing a pixel negativity value for each negative pixelin said at least a subset; operating on the pixel negativity values todetermine the first negativity value.
 20. The memory medium of claim 19wherein said operating comprises summing the pixel negativity values toobtain the first negativity value.
 21. The memory medium of claim 19wherein said operating comprises computing a statistic on the pixelnegativity values.
 22. The memory medium of claim 16, wherein saidfiltering comprises (a) filtering a first attribute of said firstplurality of samples with the first filter to generate a first componentof the output pixels of the first set, and (b) filtering a secondattribute of said first plurality of samples with a second filter togenerate a second component of the output pixels of the first set;wherein the first negativity value is based on the first component ofthe first set of output pixels; wherein the instructions are furtherconfigure to: compute a second negativity value based on the secondcomponent of the output pixels of the first set; and adjust the secondfilter in response to said second negativity value.
 23. The memorymedium of claim 22, where the first attribute and second attribute areselected from the group consisting of red, green, blue, and alpha. 24.The memory medium of claim 16, wherein the instructions are furtherconfigured to: render a second plurality of samples for a next frame inresponse to additional graphics data; and filter said second pluralityof samples using said adjusted filter.
 25. The memory medium of claim16, wherein said computing said negativity value comprises: computingpixel negativity values for output pixels of the first set having one ormore negative components; forming a histogram of said pixel negativityvalues; and computing a statistic based on the histogram cell values.26. The memory medium of claim 25, wherein said histogram has cellboundaries which occur at successive powers of two.
 27. The memorymedium of claim 25, wherein said statistic comprises a weighted averageof the histogram cell values.
 28. The memory medium of claim 16, whereinsaid adjusting comprises selecting a new filter comprising less negativelobe energy than said first filter.
 29. The memory medium of claim 16,wherein said adjusting comprises changing parameters of the first filterwithin a parameterized family of filters in a direction of decreasingnegative lobe energy.
 30. The memory medium of claim 16 wherein theinstructions are further configured to transmit the first set of outputpixels to a display device.
 31. A graphics system comprising: arendering unit operable to receive a graphics data stream, wherein saidrendering unit is operable to render samples in response to saidgraphics data stream; a sample buffer coupled to said rendering unit,wherein said sample buffer is operable to store said samples; and asample-to-pixel calculation unit coupled to said sample buffer, whereinsaid sample-to-pixel calculation unit is operable to filter a firstplurality of said samples corresponding to a first frame using a firstfilter to generate a first set of output pixels for said first frame; anegativity computation unit configured to: compute a first negativityvalue based on said first set of output pixels, wherein said firstnegativity value measures an amount of negativity in said first frame;and adjust said first filter in response to said first negativity value.32. The graphics system of claim 31, wherein said negativity computationunit is operable to adjust said first filter in response to a magnitudeof the first negative value exceeding a negativity threshold.
 33. Thegraphics system of claim 32, wherein said negativity threshold isadjustable by a user.
 34. The graphics system of claim 31 furthercomprising a filter memory coupled to the sample-to-pixel calculationunit and the negativity computation unit, wherein the sample-to-pixelcalculation unit is configured to read filter parameters from the filtermemory and generate filter weights for said first plurality of samplesbased on said filter parameters, wherein the negativity computation unitis configured to adjust the first filter by storing adjusted filterparameters in the filter memory.
 35. The graphics system of claim 31,wherein said negativity computation unit is operable to compute thefirst negativity value by: identifying negative pixels at least a subsetof said first set of output pixels, wherein negative pixels are outputpixels having one or more negative pixel components; computing a pixelnegativity value for each negative pixel in said at least a subset;operating on the pixel negativity values to determine the firstnegativity value.
 36. The graphics system of claim 35 wherein saidnegativity computation unit to configured to operate on the pixelnegativity values by summing the pixel negativity values.
 37. Thegraphics system of claim 35 wherein said negativity computation unit isconfigured to operate on the pixel negativity values by computing astatistic on the pixel negativity values.
 38. The graphics system ofclaim 31, wherein said sample-to-pixel calculation unit is operable to:filter a first attribute of said first plurality of samples with thefirst filter to generate a first component of the output pixels of thefirst set, wherein the first negativity value is based on the firstcomponent of the first set of output pixels; filter a second attributeof said first plurality of samples with a second filter to generate asecond component of the output pixels of the first set; wherein thenegativity computation unit is configured to: compute a secondnegativity value based on the second component of the output pixels ofthe first set; and adjust the second filter in response to said secondnegativity value.
 39. The graphics system of claim 38, wherein the firstattribute and second attribute are selected from the group consisting ofred, green, blue, and alpha.
 40. The graphics system of claim 31,wherein the sample-to-pixel calculation unit is further operable tofilter a second plurality of said samples corresponding to a next frameusing said adjusted filter.
 41. The graphics system of claim 31, whereinsaid negativity computation unit is operable to compute said firstnegativity value by: computing pixel negativity values for output pixelsof the first set having one or more negative components; forming ahistogram of said pixel negativity values; and computing a statisticbased on the histogram cell values.
 42. The graphics system of claim 41,wherein said histogram has cell boundaries which occur at successivepowers of two.
 43. The graphics system of claim 41, wherein saidstatistic comprises a weighted average of the histogram cell values. 44.The graphics system of claim 31, wherein said negativity computationunit is operable to adjust said first filter by selecting a new filterwith less negative lobe energy than said first filter.
 45. The graphicssystem of claim 31, wherein said negativity computation unit is operableto adjust said first filter by changing parameters of the first filterwithin a parameterized family of filters in a direction of decreasingnegative lobe energy.
 46. The graphics system of claim 31, wherein saidsample-to-pixel calculation unit is operable to transmit the first setof output pixels to a display device.